fs: throw 412 when not logged in
Signed-off-by: Varun Patil <varunpatil@ucla.edu>pull/563/head
parent
5ae7c83147
commit
9e43075df4
|
@ -110,10 +110,7 @@ class ClustersController extends GenericApiController
|
||||||
*/
|
*/
|
||||||
protected function init(string $backend): void
|
protected function init(string $backend): void
|
||||||
{
|
{
|
||||||
$user = $this->userSession->getUser();
|
Util::getUser();
|
||||||
if (null === $user) {
|
|
||||||
throw Exceptions::NotLoggedIn();
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->backend = ClustersBackendManager::get($backend);
|
$this->backend = ClustersBackendManager::get($backend);
|
||||||
|
|
||||||
|
|
|
@ -87,7 +87,7 @@ class FsManager
|
||||||
|
|
||||||
// Anything else needs a user
|
// Anything else needs a user
|
||||||
if (null === $user) {
|
if (null === $user) {
|
||||||
throw new \Exception('User not logged in: no timeline root');
|
throw Exceptions::NotLoggedIn();
|
||||||
}
|
}
|
||||||
$uid = $user->getUID();
|
$uid = $user->getUID();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue