From eb720241da3d786c6ec79f2325277fa4af23846f Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Wed, 26 Feb 2025 13:04:55 +0100 Subject: [feature] Enforce OAuth token scopes (#3835) * move tokenauth to apiutil * enforce scopes * docs * update test models, remove deprecated "follow" * file header * tests * tweak scope matcher * simplify... * fix tests * log user out of settings panel in case of oauth error --- internal/api/client/instance/instancepatch_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'internal/api/client/instance/instancepatch_test.go') diff --git a/internal/api/client/instance/instancepatch_test.go b/internal/api/client/instance/instancepatch_test.go index 53df20b6b..a63ca9e11 100644 --- a/internal/api/client/instance/instancepatch_test.go +++ b/internal/api/client/instance/instancepatch_test.go @@ -544,7 +544,7 @@ func (suite *InstancePatchTestSuite) TestInstancePatch5() { b, err := io.ReadAll(result.Body) suite.NoError(err) - suite.Equal(`{"error":"Forbidden: user is not an admin so cannot update instance settings"}`, string(b)) + suite.Equal(`{"error":"Forbidden: token has insufficient scope permission"}`, string(b)) } func (suite *InstancePatchTestSuite) TestInstancePatch6() { -- cgit v1.2.3