~edwargix/git.sr.ht

d3dc1d9fa17b565c010da41ba052bce55c213885 — Drew DeVault 6 years ago 557abbf
Import delegated scopes from scm.sr.ht
1 files changed, 2 insertions(+), 0 deletions(-)

M gitsrht/service.py
M gitsrht/service.py => gitsrht/service.py +2 -0
@@ 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):