Skip to content
Snippets Groups Projects
Commit 84fe37f2 authored by Ron Lucke's avatar Ron Lucke
Browse files

Merge branch 'main' into 'main'

Update 8/27/21

See merge request rlucke/studip!1
parents d93fd7f8 97156e12
No related branches found
No related tags found
No related merge requests found
......@@ -66,6 +66,12 @@ class Api_OauthController extends StudipController
try {
$consumer = RESTAPI\Consumer\Base::detectConsumer('oauth', 'request');
if (!$consumer) {
$this->response->set_status(400, 'No consumer detected');
$this->render_nothing();
return;
}
if (Request::submitted('allow')) {
$result = $consumer->grantAccess($GLOBALS['user']->id);
......
......@@ -30,7 +30,7 @@ class SmileysController extends AuthenticatedController
PageLayout::setTitle(_('Smiley-Übersicht'));
$this->favorites_activated = SmileyFavorites::isEnabled()
&& $GLOBALS['user']->id != nobody;
&& $GLOBALS['user']->id != 'nobody';
if ($this->favorites_activated) {
$this->favorites = new SmileyFavorites($GLOBALS['user']->id);
......
......@@ -35,7 +35,7 @@ $app = AppFactory::create();
$container->set(\Slim\App::class, $app);
// Set the base path
$app->setBasePath('/jsonapi.php');
$app->setBasePath($GLOBALS['CANONICAL_RELATIVE_PATH_STUDIP'] . 'jsonapi.php');
// Register middleware
$middleware = require 'lib/classes/JsonApi/middleware.php';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment