Files: added virtual rooms default share
This commit is contained in:
parent
2811e694c6
commit
d370c797bb
@ -305,6 +305,32 @@ public class FileSecurity : IFileSecurity
|
||||
// TODO: For Projects and other
|
||||
defaultShareRecord = null;
|
||||
break;
|
||||
|
||||
case FolderType.VirtualRooms:
|
||||
defaultShareRecord = new FileShareRecord
|
||||
{
|
||||
Level = int.MaxValue,
|
||||
EntryId = entry.Id,
|
||||
EntryType = entry.FileEntryType,
|
||||
Share = FileShare.Read,
|
||||
Subject = Constants.GroupAdmin.ID,
|
||||
TenantId = _tenantManager.GetCurrentTenant().Id,
|
||||
Owner = entry.RootCreateBy
|
||||
};
|
||||
|
||||
if (!shares.Any())
|
||||
{
|
||||
if ((defaultShareRecord.Share == FileShare.Read && action == FilesSecurityActions.Read) ||
|
||||
(defaultShareRecord.Share == FileShare.ReadWrite))
|
||||
{
|
||||
return _userManager.GetUsersByGroup(defaultShareRecord.Subject)
|
||||
.Where(x => x.Status == EmployeeStatus.Active).Select(y => y.Id).Distinct();
|
||||
}
|
||||
|
||||
return Enumerable.Empty<Guid>();
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
defaultShareRecord = null;
|
||||
|
Loading…
Reference in New Issue
Block a user