Browse Source

fix: checkExclusiveAccess incorrectly includes root admin

pull/2429/head
NGPixel 4 years ago
parent
commit
02c3c66084
1 changed files with 0 additions and 5 deletions
  1. 5
      server/core/auth.js

5
server/core/auth.js

@ -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…
Cancel
Save