mirror of
https://github.com/Deutscher-Tischfussballbund/com_sportsmanager.git
synced 2026-06-10 14:37:52 +00:00
fix: add more specific error message to no access method
This commit is contained in:
@@ -41,8 +41,8 @@ class MathParserSM extends MathParser
|
||||
abortWithError(401 . ' Unauthorized');
|
||||
}
|
||||
if (!$login || Factory::getContainer()->get(SiteApplication::class)->getIdentity()->id) {
|
||||
Log::add('an error occurred', Log::ERROR, 'com_sportsmanager');
|
||||
throw new RuntimeException('An error occurred.', 500);
|
||||
Log::add('Unauthorized user with id ' . Factory::getContainer()->get(SiteApplication::class)->getIdentity()->id, Log::WARNING, 'com_sportsmanager');
|
||||
throw new RuntimeException('´Not authorized!', 401);
|
||||
}
|
||||
$version = new Version();
|
||||
$joomla = $version->getShortVersion();
|
||||
|
||||
Reference in New Issue
Block a user