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

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

public DeleteDataPermission ( long subjectId, long entityId, long dataId, RightType rightType ) : bool
subjectId long
entityId long
dataId long
rightType RightType
Результат bool
        public bool DeleteDataPermission(long subjectId, long entityId, long dataId, RightType rightType)
        {
            DataPermission dataPermission = GetDataPermission(subjectId, entityId, dataId, rightType);

            if (dataPermission != null)
            {
                using (IUnitOfWork uow = this.GetUnitOfWork())
                {
                    IRepository<DataPermission> dataPermissionsRepo = uow.GetRepository<DataPermission>();

                    dataPermissionsRepo.Delete(dataPermission);
                    uow.Commit();
                }

                return (true);
            }

            return (false);
        }

Usage Example

Пример #1
0
        public bool DeleteDataPermission(long subjectId, long entityId, long dataId, int rightType)
        {
            PermissionManager permissionManager = new PermissionManager();

            permissionManager.DeleteDataPermission(subjectId, entityId, dataId, (RightType)rightType);

            return true;
        }
All Usage Examples Of BExIS.Security.Services.Authorization.PermissionManager::DeleteDataPermission