Html::displayRightError PHP Method

displayRightError() static public method

Display common message for privileges errors
static public displayRightError ( ) : Nothing
return Nothing (die)
    static function displayRightError()
    {
        self::displayErrorAndDie(__("You don't have permission to perform this action."));
    }

Usage Example

 function checkRight($itemtype, $right)
 {
     global $CFG_GLPI;
     if (!Session::haveRight($itemtype, $right)) {
         // Check for session timeout
         if (!isset($_SESSION['glpiID'])) {
             Html::redirect($CFG_GLPI['root_doc'] . '/index.php');
             exit;
         }
         Html::displayRightError();
     }
 }
All Usage Examples Of Html::displayRightError
Html