fs: throw 412 when not logged in

Signed-off-by: Varun Patil <varunpatil@ucla.edu>
pull/563/head
Varun Patil 2023-03-23 21:16:53 -07:00
parent 5ae7c83147
commit 9e43075df4
2 changed files with 2 additions and 5 deletions

View File

@ -110,10 +110,7 @@ class ClustersController extends GenericApiController
*/
protected function init(string $backend): void
{
$user = $this->userSession->getUser();
if (null === $user) {
throw Exceptions::NotLoggedIn();
}
Util::getUser();
$this->backend = ClustersBackendManager::get($backend);

View File

@ -87,7 +87,7 @@ class FsManager
// Anything else needs a user
if (null === $user) {
throw new \Exception('User not logged in: no timeline root');
throw Exceptions::NotLoggedIn();
}
$uid = $user->getUID();