diff --git a/critiquebrainz/frontend/views/oauth.py b/critiquebrainz/frontend/views/oauth.py index c08e0605..5310bd0e 100644 --- a/critiquebrainz/frontend/views/oauth.py +++ b/critiquebrainz/frontend/views/oauth.py @@ -35,4 +35,4 @@ def authorize_prompt(): code = oauth.generate_grant(client_id, current_user.id, redirect_uri, scope) return redirect(build_url(redirect_uri, dict(code=code, state=state))) except OAuthError as e: - raise BadRequest(e.desc) \ No newline at end of file + raise BadRequest(e.desc) diff --git a/critiquebrainz/ws/oauth/provider.py b/critiquebrainz/ws/oauth/provider.py index 313cce5b..df2e1480 100644 --- a/critiquebrainz/ws/oauth/provider.py +++ b/critiquebrainz/ws/oauth/provider.py @@ -212,7 +212,8 @@ def get_authorized_user(self, scopes): raise exceptions.InvalidToken token_scopes = token["scope"] - for scope in scopes: + new_scopes = [f"critiquebrainz:{s}" for s in scopes] + for scope in new_scopes: if scope not in token_scopes: raise exceptions.InvalidToken diff --git a/docker/docker-compose.dev.yml b/docker/docker-compose.dev.yml index e4a1a1d4..6bec1f03 100644 --- a/docker/docker-compose.dev.yml +++ b/docker/docker-compose.dev.yml @@ -57,4 +57,4 @@ services: dockerfile: Dockerfile.webpack command: npm run dev volumes: - - ..:/code:z + - ../critiquebrainz:/code/critiquebrainz:z