public DetailsRoleModel GetUpdateModel(string roleName)
        {
            var rolesForPage = new List <BaseRoleElement>();
            var allRoles     = IdentityRepository.GetAllRoles();

            allRoles.Remove(roleName);
            var baseRoles = IdentityRepository.GetRolesForRole(roleName);

            baseRoles.ForEach(role => rolesForPage.Add(new BaseRoleElement(role, true)));
            allRoles.Except(baseRoles).ForEach(role => rolesForPage.Add(new BaseRoleElement(role)));
            return(new DetailsRoleModel(roleName, true, rolesForPage));
        }
Ejemplo n.º 2
0
        public IdentityResponse GetRolesForRole(GetRolesForRoleRequest request)
        {
            var data = IdentityRepository.GetRolesForRole(request.Role);

            return(new IdentityResponse(data));
        }