Base solution for your next web application

Activities of "nnlee"

Answer

<cite>NNLEE: </cite> All right .Is there a last version demo .Thank you.

That means some another project with new version Abp or another way to learn about this topic.

Answer

All right .Is there a last version demo .Thank you.

<cite>hikalkan: </cite> Hi,

You are using Configuration.Authorization.Providers.Add<Permission>(); in the Permission class. It's not true. It should be done in PreInitialize method of your module (<a class="postlink" href="http://www.aspnetboilerplate.com/Pages/Documents/Module-System#DocModulePreInit">http://www.aspnetboilerplate.com/Pages/ ... ulePreInit</a>). Also, "Permission" name is not good, I suggest to change it to MyPermissionProvider or something like that.

Thank a lot ,I just read the module topic ,suddenly figured out ,thanks again patiently answered :D

<cite>hikalkan: </cite> Can you share whole code? Have you defined auth provider? Which version of ABP are you using?

Version 0.6.2 . And I has upadate it ver 0.6.4 ,but always cant find it. Please help me check it ,thank you very muck

using Abp;
using Abp.Authorization;
namespace Foundation.Application
{
    public class Permission : AuthorizationProvider
    {
        public override void SetPermissions(IPermissionDefinitionContext context)
        {
            var administrator = context.CreatePermission("Administrator", null);

            var userManagement = administrator.CreateChildPermission("Administrator.UserManagement");

            userManagement.CreateChildPermission("Administrator.UserManagement.CreateUser");

            var roleManagement = administrator.CreateChildPermission("Administrator.RoleManagement");

            Configuration.Authorization.Providers.Add<Permission>();
          
            
        }
    }
}
Showing 1 to 4 of 4 entries