Base solution for your next web application

Activities of "olivierroecker"

Question

Hi, I would like to use the WebApi Method expose by Swagger; There are a core Method Account\Authenticate to get a token.

How is it possible to use the Impersonate mecanism with WebApi ? In my business case, i have a user : UserName, Password as host user with goods rights, and a UserId and TenantId.

How can i get a token to consume the Api API with these 4 informations.

I'm using ABP 3.4.0 with a Aspnetzero MVC Project

Thanks Oliver :)

Perfect... Thanks....

In an ApplicationService, i would check if a user have a Permission.

But when i use the PermissionChecker.IsGranted function, it return the false value... in all case...

See my code :

public async Task DoRecurrentReportAsync()
        {
            using (CurrentUnitOfWork.DisableFilter(AbpDataFilters.MayHaveTenant))
            {
                var query = _userManager.Users.Where(p => p.IsActive).ToList();
                foreach(var user in query)
                {
                    if (user.TenantId.HasValue)
                    {
                        var userIdentifier = new UserIdentifier(user.TenantId.Value, user.Id);
                        var checker = PermissionChecker.IsGranted(userIdentifier, true, new string[] { AppPermissions.Pages_Tenant_Contracts });
                        if (checker)
                        {
                            await SendContractsDashboard(user.TenantId.Value, user.Id);
                        }
                    }
                }
            }
        }

Thanks for your help

Hi, I'm using asp.net zero Template 3.x, With the tuto, i undestand how setup the social login for Google and Facebook in my project, it's very simple... but the Google and Facebook page setting app ask to me a URL and i don't know what value use ?

Question

Hi, I don't undestand, or i don't find what is the URL callback that i must put in the Google Setup Oauth ? Where can i find the answer ?

is it <a class="postlink" href="https://mysite/signin-google">https://mysite/signin-google</a> ? or <a class="postlink" href="https://mysite/Account/ExternalLoginCallBack">https://mysite/Account/ExternalLoginCallBack</a> ?

Thank by advance

Hi, I'm confuse, but i think that you will must get me by the hand on this case. i use a asp.net zero template MVC, there is not a directory Localization in the project web, but this folder exists in the .Core project of my solution... in this case, i don't understood how start or use this article in a "step-by-step" approach... During the run, the server said to me that /Localization/AbpWebExtensions can be found, Thanks for your patience

My PreInitialize is here: public override void PreInitialize() { Configuration.Auditing.IsEnabledForAnonymousUsers = true;

        //Declare entity types
        Configuration.Modules.Zero().EntityTypes.Tenant = typeof (Tenant);
        Configuration.Modules.Zero().EntityTypes.Role = typeof (Role);
        Configuration.Modules.Zero().EntityTypes.User = typeof (User);

        //Add/remove localization sources
        Configuration.Localization.Sources.Add(
            new DictionaryBasedLocalizationSource(
                "Loxo_FrontOffice",
                new XmlEmbeddedFileLocalizationDictionaryProvider(
                    Assembly.GetExecutingAssembly(),
                    "Lexigone.Loxo_FrontOffice.Localization.Loxo_FrontOffice"
                    )
                )
            );

        //Configuration.Localization.Sources.Extensions.Add(
        //    new LocalizationSourceExtensionInfo("AbpWeb",
        //    new XmlFileLocalizationDictionaryProvider(
        //        HttpContext.Current.Server.MapPath("~/Localization/AbpWebExtensions")
        //        )
        //    )
        //);

it's OK, thanks :D

Hi, Sorry, but your reply is more confuse for me, can you get to me more explication ? i'm using aspnetzero package, how can i add this abp extension localization ? add a nuget package or directly add theses files in my solution ?

Thanks for your help. Olivier

I'm using the ASPNETZERO MVC release, no angular... In the Core ASPNETZERO part, the screen in your explanation is not exactly the same as my own, in my case there are only two button: Cancel and Save. If i push the return key in my keyboard, the Save button is fired, and on new line is not add in the textarea, it's the same issue in IE or Chrome last releases.

Thanks for your help.

Hi, Yes, .... when you press the key "return" on your keyboard in a textarea in a modal form as "Administration/language/ChangeText/Edit" modal, is not possible to insert a new line because, the Submit action of the form is fired.

Good beginning of week. Olivier

Showing 1 to 10 of 20 entries