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