protected static function getFullMessage($file, $line, $message) { $fullMessage = static::formatErrorMessage($file, $line, $message); $fullMessage .= "\r\n"; $fullMessage .= \Faid\Debug\defaultDebugBackTrace(true); return $fullMessage; }
public static function checkCurrentUserGrants($aclActionList) { if (empty($aclActionList)) { return; } if (!is_array($aclActionList)) { throw new ACLException('Property `aclActionList` should be array type '); } $grantList = self::getCurrentUserGrants(); $result = self::testGrants($aclActionList, $grantList); if (!$result) { $msg = "User not have enough rights to access requested action - " . self::$rightFailed; $fullMsg = sprintf("%s\r\nRequested grants:%s\r\nCurrent user:\r\n%s\r\n%s", $msg, print_r($aclActionList, true), print_r(UsersLogin::getCurrentSession(), true), \Faid\Debug\defaultDebugBackTrace(false)); \Extasy\Audit\Record::add(__CLASS__, $msg, $fullMsg); throw new ForbiddenException($msg); } }