Web: Fixed.
This commit is contained in:
parent
b3ea0a8c7d
commit
24e82cb1eb
@ -60,8 +60,6 @@ class AccessRightsStore {
|
|||||||
canLockFile = (file) => {
|
canLockFile = (file) => {
|
||||||
const { security } = file;
|
const { security } = file;
|
||||||
|
|
||||||
// if (rootFolderType === FolderType.USER) return false;
|
|
||||||
|
|
||||||
return security?.Lock;
|
return security?.Lock;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -92,31 +90,15 @@ class AccessRightsStore {
|
|||||||
};
|
};
|
||||||
|
|
||||||
canFillForm = (file) => {
|
canFillForm = (file) => {
|
||||||
const { rootFolderType, access } = file;
|
const { security } = file;
|
||||||
|
|
||||||
if (rootFolderType === FolderType.Archive)
|
return security?.FillForms;
|
||||||
return getArchiveFileRoleActions(access).fillForm;
|
|
||||||
|
|
||||||
if (rootFolderType === FolderType.TRASH) return false;
|
|
||||||
|
|
||||||
return getFileRoleActions(access).fillForm;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
canMakeForm = (item) => {
|
canMakeForm = (item) => {
|
||||||
const { rootFolderType, access } = item;
|
const { security } = item;
|
||||||
|
|
||||||
if (rootFolderType === FolderType.Archive)
|
return security?.Duplicate;
|
||||||
return getArchiveFileRoleActions(access).saveAsForm;
|
|
||||||
|
|
||||||
if (
|
|
||||||
rootFolderType === FolderType.TRASH ||
|
|
||||||
// rootFolderType === FolderType.Privacy ||
|
|
||||||
rootFolderType === FolderType.Favorites ||
|
|
||||||
rootFolderType === FolderType.Recent
|
|
||||||
)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
return getFileRoleActions(access).saveAsForm;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
canArchiveRoom = (room) => {
|
canArchiveRoom = (room) => {
|
||||||
@ -153,14 +135,9 @@ class AccessRightsStore {
|
|||||||
};
|
};
|
||||||
|
|
||||||
get canCreateFiles() {
|
get canCreateFiles() {
|
||||||
const { access, rootFolderType } = this.selectedFolderStore;
|
const { security } = this.selectedFolderStore;
|
||||||
|
|
||||||
if (rootFolderType === FolderType.Archive)
|
return security?.Create;
|
||||||
return getArchiveFileRoleActions(access).create;
|
|
||||||
|
|
||||||
const { create } = getFileRoleActions(access);
|
|
||||||
|
|
||||||
return create;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
canMoveItems = (item) => {
|
canMoveItems = (item) => {
|
||||||
@ -185,20 +162,9 @@ class AccessRightsStore {
|
|||||||
return security?.Copy;
|
return security?.Copy;
|
||||||
};
|
};
|
||||||
canDuplicateFile = (item) => {
|
canDuplicateFile = (item) => {
|
||||||
const { rootFolderType, access } = item;
|
const { security } = item;
|
||||||
|
|
||||||
if (rootFolderType === FolderType.Archive)
|
return security?.Duplicate;
|
||||||
return getArchiveFileRoleActions(access).canDuplicate;
|
|
||||||
|
|
||||||
if (
|
|
||||||
rootFolderType === FolderType.TRASH ||
|
|
||||||
rootFolderType === FolderType.Favorites ||
|
|
||||||
rootFolderType === FolderType.Recent
|
|
||||||
// || rootFolderType === FolderType.Privacy
|
|
||||||
)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
return getFileRoleActions(access).canDuplicate;
|
|
||||||
};
|
};
|
||||||
canChangeUserType = (user) => {
|
canChangeUserType = (user) => {
|
||||||
const { id, isOwner } = this.authStore.userStore.user;
|
const { id, isOwner } = this.authStore.userStore.user;
|
||||||
|
Loading…
Reference in New Issue
Block a user