Skip to content

Commit 46dbf21

Browse files
authored
Merge pull request icebob#51 from ianfiske/patch-1
Check for admin is broken
2 parents e41c564 + e0a3e65 commit 46dbf21

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/core/context.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ class Context {
237237

238238
// check role
239239
.then(() => {
240-
if (permission == C.PERM_ADMIN && this.isAdmin()) {
240+
if (permission == C.PERM_ADMIN && !this.isAdmin()) {
241241
this.errorForbidden();
242242
}
243243
else if (permission == C.PERM_USER && this.user.roles.indexOf(C.ROLE_USER) == -1) {
@@ -621,4 +621,4 @@ class Context {
621621

622622
}
623623

624-
module.exports = Context;
624+
module.exports = Context;

0 commit comments

Comments
 (0)