mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-25 00:07:47 +01:00
fix: allow permissions to be checked without project being defined (#282)
* fix: allow permissions to be checked without project being defined * fix: change order Co-authored-by: Ivar Conradi Østhus <ivarconr@gmail.com>
This commit is contained in:
parent
e8de5bd816
commit
c4f44f7558
@ -21,9 +21,15 @@ const AccessProvider: FC<IAccessProvider> = ({ store, children }) => {
|
||||
if (p.permission === ADMIN) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (p.permission === permission && p.project === project) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (p.permission === permission && project === undefined) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user