Base solution for your next web application

Activities of "sferrari"

Thanks !!!!! :D :D :D :D

Hi, User ID 1 => ROLE = "Master" => is ok User ID 2 => ROLE = "Admin" => error (not permission Module.Configuration), why it does not work ?

PLEASE HELP !!!! :(

Hi, as I do for work authorization attributes "AbpMvcAuthorization" for example for 2 roles? I only work for one role?

Ej.

Table AbpUsers = id: 1 Name: xxxxx

Table AbpUserRoles = id: 1 idUser: 1 idRol: 1

Table AbpRoles = id: 1 name: Master id: 2 name: Admin

It works OK !


Ej.

Table AbpUsers = id: 1 Name: xxxxx

Table AbpUserRoles = id: 1 idUser: 1 idRol: 2

Table AbpRoles = id: 1 name: Master id: 2 name: Admin

It does not work.

OK: public override void PreInitialize() { //Remove the following line to disable multi-tenancy. Configuration.MultiTenancy.IsEnabled = true;

        //Add/remove localization sources here
        Configuration.Localization.Sources.Add(
            new DictionaryBasedLocalizationSource(
                ManagerConsts.LocalizationSourceName,
                new XmlEmbeddedFileLocalizationDictionaryProvider(
                    Assembly.GetExecutingAssembly(),
                    "Manager.Core.Localization.Source"
                    )
                )
            );

        AppRoleConfig.Configure(Configuration.Modules.Zero().RoleManagement);

        Configuration.Authorization.Providers.Add<ManagerAuthorizationProvider>();

        Configuration.Settings.Providers.Add<EmailSettingDefinitionProvider>();
    }

OK: [AbpMvcAuthorize(PermissionNames.Module_Customers)] public class CustomersController : ManagerControllerBase


public class ManagerAuthorizationProvider : AuthorizationProvider { public override void SetPermissions(IPermissionDefinitionContext context) {

        var moduleCustomers = context.CreatePermission(PermissionNames.Module_Customers)
            .CreateChildPermission(PermissionNames.Module_Customers_Create)
            .CreateChildPermission(PermissionNames.Module_Customers_Edit)
            .CreateChildPermission(PermissionNames.Module_Customers_Delete);

    }

}

Hi thanks for the reply, I tell you that goes for the role = 1, but not for the role = 2, do not understand why?

Hello, print screen step how to implement the provider and the attribute of the controller tells me permission does not exist ...

So in my case example happens to you, the role name must match the name of the provider permission?

Ex. Table AbpUsers = id: 1 Name: xxxxx Table AbpUserRoles = id: 1 idUser: 1 idRol: 1

Table AbpRoles = id: 1 name: Master

In the provider you have to coindir the role name, as you associate with the permission of the user provider role id or id?

The provider must match one of these data in the table?

Thank you.

Hi, thanks for the reply, permissions must not be stored in the table AbpPermissions? but that it would be used?

On the other hand I do not understand how to use: MyAuthorizationProvider as permission to relate the role id or user id logged?

Attached the print screen of the table "AbpPermissions"

Thank you.

Showing 1 to 8 of 8 entries