1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 04:46:40 +07:00
This commit is contained in:
Fedor Katurov 2021-03-22 15:56:35 +07:00
parent 9745b895f1
commit 11fd582453
23 changed files with 328 additions and 101 deletions

View file

@ -16,6 +16,6 @@ export const canLikeNode = (node: Partial<INode>, user: Partial<IUser>): boolean
path(['role'], user) && path(['role'], user) !== USER_ROLES.GUEST;
export const canStarNode = (node: Partial<INode>, user: Partial<IUser>): boolean =>
node.type === NODE_TYPES.IMAGE &&
(node.type === NODE_TYPES.IMAGE || node.is_promoted === false) &&
path(['role'], user) &&
path(['role'], user) === USER_ROLES.ADMIN;