From 16cd996a79fb02b7bc5bede460e05d5e4915c783 Mon Sep 17 00:00:00 2001 From: Philipp Metzner Date: Tue, 16 Dec 2025 21:01:56 +0100 Subject: [PATCH] Add comment about Auth0 permissions --- library/constants.php | 2 ++ library/lib/auth0.php | 2 ++ 2 files changed, 4 insertions(+) diff --git a/library/constants.php b/library/constants.php index 5d638ed0f..f6558ba55 100644 --- a/library/constants.php +++ b/library/constants.php @@ -415,6 +415,8 @@ ]; // This has to be identical to the rolesMapping in the Auth0 dynamic-permissions script +// WARNING: If you add elements here, you need to make sure they're part of the permissions +// registered in Auth0! $rolesToActions = [ 'boxtribute_god' => [ 'be_god', diff --git a/library/lib/auth0.php b/library/lib/auth0.php index ee059bc0e..021894b78 100644 --- a/library/lib/auth0.php +++ b/library/lib/auth0.php @@ -544,6 +544,8 @@ function updateRolePermissions($roleId, $resourseServerIdentifier, $methods) return $res; } + // If this fails with a 404, it's very likely that some of the submitted + // permissions are not actually registered as permissions in Auth0 throw new Exception($response->getReasonPhrase(), $response->getStatusCode()); }