Esempio n. 1
0
        /// <summary>
        /// Activate role
        /// <remarks>Save changes after operation</remarks>
        /// </summary>
        public void Activate(IPermissionContext context)
        {
            var role = context.RolesToPermissions.Find(this.RoleName);

            role.Active   = true;
            role.Modified = DateTime.Now;
        }
Esempio n. 2
0
        public void Initialize(IPermissionContext context)
        {
            var pages = context.CreatePermission(QuickAppPermissionNames.PermissionPages, "", true);

            pages.CreateChild(QuickAppPermissionNames.PermissionPagesHome, "", true);
            pages.CreateChild(QuickAppPermissionNames.PermissionPagesRoles, "")
            .CreateChild(QuickAppPermissionNames.PermissionCanCreateRoles, "");
            pages.CreateChild(QuickAppPermissionNames.PermissionPagesUsers, "")
            .CreateChild(QuickAppPermissionNames.PermissionCanCreateUsers, "");
        }
Esempio n. 3
0
 public CalcAllowedPermissions(IPermissionContext context)
 {
     _dbContext = context;
 }
Esempio n. 4
0
 public GetAllPlatformsQueryHandler(IPermissionContext context)
 {
     _context = context;
 }
Esempio n. 5
0
 public DeleteRoleCommandHandler(IPermissionContext context)
 {
     _context = context;
 }
Esempio n. 6
0
 public GetRoleDetailQueryHandler(UserManager <ApplicationUser> userManager, IPermissionContext context)
 {
     _userManager = userManager;
     _context     = context;
 }
Esempio n. 7
0
 public GetRoleListQueryHandler(IPermissionContext context)
 {
     _context = context;
 }
Esempio n. 8
0
 public ListUsers(IPermissionContext applicationDbContext)
 {
     _applicationDbContext = applicationDbContext;
 }
Esempio n. 9
0
 public SecurityController(IPermissionContext context)
 {
     _permissionsContext = context;
 }
Esempio n. 10
0
 public SecurityController()
 {
     _permissionsContext = new PermissionContext();
 }
Esempio n. 11
0
 public ActivateRoleCommandHandler(IPermissionContext context)
 {
     _context = context;
 }
Esempio n. 12
0
 public CreateRoleCommandHandler(IPermissionContext context, RoleManager <ApplicationRole> roleManager)
 {
     _context     = context;
     _roleManager = roleManager;
 }
Esempio n. 13
0
 public GetPlatformQueryDetailsHandler(IPermissionContext gearContext)
 {
     _gearContext = gearContext;
 }