fix: checkExclusiveAccess incorrectly includes root admin
This commit is contained in:
parent
7c0d6e2883
commit
02c3c66084
@ -296,11 +296,6 @@ module.exports = {
|
||||
checkExclusiveAccess(user, includePermissions = [], excludePermissions = []) {
|
||||
const userPermissions = user.permissions ? user.permissions : user.getGlobalPermissions()
|
||||
|
||||
// System Admin
|
||||
if (userPermissions.includes('manage:system')) {
|
||||
return true
|
||||
}
|
||||
|
||||
// Check Inclusion Permissions
|
||||
if (_.intersection(userPermissions, includePermissions).length < 1) {
|
||||
return false
|
||||
|
Loading…
Reference in New Issue
Block a user