Переглянути джерело

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

master
Skylar Ittner 1 рік тому
джерело
коміт
dafc3b76ea
2 змінених файлів з 6 додано та 2 видалено
  1. 5
    2
      index.php
  2. 1
    0
      lang/en_us.php

+ 5
- 2
index.php Переглянути файл

@@ -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;

+ 1
- 0
lang/en_us.php Переглянути файл

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

Завантаження…
Відмінити
Зберегти