|
|
@ -7,7 +7,7 @@ module.exports = class { |
|
|
|
|
|
|
|
onInput(input) { |
|
|
|
if (!input.user || !input.user.loggedIn) { |
|
|
|
this.state.permitted = false |
|
|
|
this.state.permitted = input.not |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
@ -18,5 +18,10 @@ module.exports = class { |
|
|
|
} else { |
|
|
|
this.state.permitted = input.user.permissions.includes(input.permission) |
|
|
|
} |
|
|
|
|
|
|
|
// Flip the above permission
|
|
|
|
if (input.not) { |
|
|
|
this.state.permitted = !this.state.permitted |
|
|
|
} |
|
|
|
} |
|
|
|
} |