BExIS.Security.Services.Authorization.PermissionManager.GetAllRights C# (CSharp) Метод

GetAllRights() публичный Метод

public GetAllRights ( long subjectId, long entityId, long dataId ) : IQueryable
subjectId long
entityId long
dataId long
Результат IQueryable
        public IQueryable<int> GetAllRights(long subjectId, long entityId, long dataId)
        {
            return DataPermissionsRepo.Query(p => p.Subject.Id == subjectId && p.Entity.Id == entityId && p.DataId == dataId).Select(p => (int)p.RightType);
        }

Usage Example

Пример #1
0
        public ActionResult Subjects_Select(long dataId, long entityId)
        {
            EntityManager entityManager = new EntityManager();
            PermissionManager permissionManager = new PermissionManager();
            SubjectManager subjectManager = new SubjectManager();

            List<DataPermissionGridRowModel> subjects = new List<DataPermissionGridRowModel>();

            IQueryable<Subject> data = subjectManager.GetAllSubjects();
            data.ToList().ForEach(s => subjects.Add(DataPermissionGridRowModel.Convert(dataId, entityManager.GetEntityById(entityId), s, permissionManager.GetAllRights(s.Id, entityId, dataId).ToList())));

            return View(new GridModel<DataPermissionGridRowModel> { Data = subjects });
        }
All Usage Examples Of BExIS.Security.Services.Authorization.PermissionManager::GetAllRights