mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-26 05:16:41 +07:00
removed player reducer, migrated to CRA 5
This commit is contained in:
parent
88f8fe21f7
commit
558e8f8a4f
211 changed files with 7131 additions and 10318 deletions
|
@ -5,8 +5,7 @@ import { path } from 'ramda';
|
|||
import { NODE_TYPES } from '~/constants/node';
|
||||
|
||||
export const canEditNode = (node?: Partial<INode>, user?: Partial<IUser>): boolean =>
|
||||
path(['role'], user) === USER_ROLES.ADMIN ||
|
||||
(path(['user', 'id'], node) && path(['user', 'id'], node) === path(['id'], user));
|
||||
path(['role'], user) === USER_ROLES.ADMIN || path(['user', 'id'], node) === path(['id'], user);
|
||||
|
||||
export const canEditComment = (comment?: Partial<ICommentGroup>, user?: Partial<IUser>): boolean =>
|
||||
path(['role'], user) === USER_ROLES.ADMIN || path(['user', 'id'], comment) === path(['id'], user);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue