mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +07:00
added nodes heroize button
This commit is contained in:
parent
c49dbb344d
commit
6b5638b44e
11 changed files with 140 additions and 47 deletions
|
@ -9,3 +9,6 @@ export const canEditNode = (node: Partial<INode>, user: Partial<IUser>): boolean
|
|||
|
||||
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 =>
|
||||
path(['role'], user) && path(['role'], user) === USER_ROLES.ADMIN;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue