/// <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; }
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, ""); }
public CalcAllowedPermissions(IPermissionContext context) { _dbContext = context; }
public GetAllPlatformsQueryHandler(IPermissionContext context) { _context = context; }
public DeleteRoleCommandHandler(IPermissionContext context) { _context = context; }
public GetRoleDetailQueryHandler(UserManager <ApplicationUser> userManager, IPermissionContext context) { _userManager = userManager; _context = context; }
public GetRoleListQueryHandler(IPermissionContext context) { _context = context; }
public ListUsers(IPermissionContext applicationDbContext) { _applicationDbContext = applicationDbContext; }
public SecurityController(IPermissionContext context) { _permissionsContext = context; }
public SecurityController() { _permissionsContext = new PermissionContext(); }
public ActivateRoleCommandHandler(IPermissionContext context) { _context = context; }
public CreateRoleCommandHandler(IPermissionContext context, RoleManager <ApplicationRole> roleManager) { _context = context; _roleManager = roleManager; }
public GetPlatformQueryDetailsHandler(IPermissionContext gearContext) { _gearContext = gearContext; }