コード例 #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;
        }
コード例 #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, "");
        }
コード例 #3
0
 public CalcAllowedPermissions(IPermissionContext context)
 {
     _dbContext = context;
 }
コード例 #4
0
 public GetAllPlatformsQueryHandler(IPermissionContext context)
 {
     _context = context;
 }
コード例 #5
0
 public DeleteRoleCommandHandler(IPermissionContext context)
 {
     _context = context;
 }
コード例 #6
0
 public GetRoleDetailQueryHandler(UserManager <ApplicationUser> userManager, IPermissionContext context)
 {
     _userManager = userManager;
     _context     = context;
 }
コード例 #7
0
 public GetRoleListQueryHandler(IPermissionContext context)
 {
     _context = context;
 }
コード例 #8
0
 public ListUsers(IPermissionContext applicationDbContext)
 {
     _applicationDbContext = applicationDbContext;
 }
コード例 #9
0
 public SecurityController(IPermissionContext context)
 {
     _permissionsContext = context;
 }
コード例 #10
0
 public SecurityController()
 {
     _permissionsContext = new PermissionContext();
 }
コード例 #11
0
 public ActivateRoleCommandHandler(IPermissionContext context)
 {
     _context = context;
 }
コード例 #12
0
 public CreateRoleCommandHandler(IPermissionContext context, RoleManager <ApplicationRole> roleManager)
 {
     _context     = context;
     _roleManager = roleManager;
 }
コード例 #13
0
 public GetPlatformQueryDetailsHandler(IPermissionContext gearContext)
 {
     _gearContext = gearContext;
 }