Fixed generic permission model to redirect to login page if anonymous user was not granted access

This commit is contained in:
Tobi Schäfer 2008-05-08 17:05:51 +00:00
parent b3a85c5998
commit 3e32e976db
3 changed files with 10 additions and 5 deletions

View file

@ -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":