Fixed generic permission model to redirect to login page if anonymous user was not granted access
This commit is contained in:
parent
b3a85c5998
commit
3e32e976db
3 changed files with 10 additions and 5 deletions
|
@ -23,10 +23,6 @@
|
|||
//
|
||||
|
||||
Members.prototype.getPermission = function(action) {
|
||||
if (!this._parent.getPermission("main")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
switch (action) {
|
||||
case "login":
|
||||
case "logout":
|
||||
|
@ -34,7 +30,13 @@ Members.prototype.getPermission = function(action) {
|
|||
case "reset":
|
||||
case "salt.js":
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!this._parent.getPermission("main")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
switch (action) {
|
||||
case "edit":
|
||||
case "privileges":
|
||||
case "subscriptions":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue