Conversation
5b37dbd to
724a5e3
Compare
6cc2e9f to
a7a5024
Compare
1767a2c to
9107940
Compare
9107940 to
37b6697
Compare
| @@ -0,0 +1,11 @@ | |||
| export const getEffectivePermissions = (...permissionSets) => { | |||
There was a problem hiding this comment.
This is elegant, but a bit hard to get at first, can you add a comment what it does? Also, can we call it combinePermissions?
There was a problem hiding this comment.
Do you mean the exported function? getEffectivePermissions should be named combinePermissions?
|
|
||
| import { getEffectivePermissions } from '../../common/utils/permissions' | ||
|
|
||
| export const useEffectivePermissions = () => { |
There was a problem hiding this comment.
Can we call this getPermissions? Also, can you add a comment, something like "create a combined set of permissions from the model based permissions for the user and the object based permissions for the project"?
There was a problem hiding this comment.
You mean the file name? So with your comment from above:
import { combinePermissions } from '../../common/utils/getPermissions'
Or do you mean renaming useEffectivePermissions to usePermissions?
There was a problem hiding this comment.
no combinePermissions in utils, plain usePermissions for the hook (or useCombinedPermissions).
37b6697 to
01094f9
Compare
01094f9 to
783e946
Compare
Uh oh!
There was an error while loading. Please reload this page.