diff options
author | Drew DeVault <sir@cmpwn.com> | 2019-04-18 15:19:58 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-04-18 15:19:58 -0400 |
commit | d3dc1d9fa17b565c010da41ba052bce55c213885 (patch) | |
tree | f808793e38b88a6198e2bd786a8abe5f623b7dab | |
parent | 557abbfa1c3f8d11c1772c6b0c6747bb9efe6670 (diff) |
Import delegated scopes from scm.sr.ht
-rw-r--r-- | gitsrht/service.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gitsrht/service.py b/gitsrht/service.py index 5c14029..6a0dae0 100644 --- a/gitsrht/service.py +++ b/gitsrht/service.py @@ -1,5 +1,6 @@ from flask import Blueprint, request, url_for from gitsrht.types import User, OAuthToken, SSHKey +from scmsrht.service import scm_scopes from srht.api import get_results from srht.database import db from srht.config import cfg, get_origin @@ -20,6 +21,7 @@ class GitOAuthService(AbstractOAuthService): required_scopes=["profile", "keys"] + ([ "{}/jobs:write".format(builds_client_id) ] if builds_client_id else []), + delegated_scopes=scm_scopes, token_class=OAuthToken, user_class=User) def ensure_user_sshkey(self, user, meta_key): |