Add message if user is kicked out of application for lack of permissions

V2-Rewrite
Skylar Ittner 6 years ago
parent 8e65d4c98d
commit dafc3b76ea

@ -1,5 +1,4 @@
<?php
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@ -9,10 +8,14 @@ require_once __DIR__ . "/required.php";
require_once __DIR__ . "/lib/login.php";
// if we're logged in, we don't need to be here.
if ($_SESSION['loggedin']) {
if ($_SESSION['loggedin'] && !isset($_GET['permissionerror'])) {
header('Location: app.php');
}
if (isset($_GET['permissionerror'])) {
$alert = lang("no permission", false);
}
/* Authenticate user */
$userpass_ok = false;
$multiauth = false;

@ -28,6 +28,7 @@ define("STRINGS", [
"login server error" => "The login server returned an error: {arg}",
"login server user data error" => "The login server refused to provide account information. Try again or contact technical support.",
"captcha error" => "There was a problem with the CAPTCHA (robot test). Try again.",
"no permission" => "You don't have permission to do that.",
"home" => "Home",
"more" => "More",
"test" => "Test"

Loading…
Cancel
Save