Commit c5365a6f authored by Robert Ricci's avatar Robert Ricci

Allow for web-only admin accounts: Allow webonly users to use

toggle.php, and make the admin bit override the webonly bit for
permissions checks.
parent e48dc6ba
......@@ -383,7 +383,7 @@ function LOGGEDINORDIE($uid, $modifier = 0, $login_url = NULL) {
USERERROR("You have not verified your account yet!", 1);
if ($status & CHECKLOGIN_UNAPPROVED)
USERERROR("Your account has not been approved yet!", 1);
if ($status & CHECKLOGIN_WEBONLY)
if (($status & CHECKLOGIN_WEBONLY) && ! ISADMIN($uid))
USERERROR("Your account does not permit you to access this page!", 1);
#
......
......@@ -19,7 +19,7 @@ include("defs.php3");
# Only known and logged in users can do this.
#
$uid = GETLOGIN();
LOGGEDINORDIE($uid);
LOGGEDINORDIE($uid, CHECKLOGIN_USERSTATUS|CHECKLOGIN_WEBONLY);
# List of valid toggles
$toggles = array("adminoff", "webfreeze");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment