mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 04:46:40 +07:00
#23 lab stats
This commit is contained in:
parent
9745b895f1
commit
11fd582453
23 changed files with 328 additions and 101 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue