Skip to content

Commit

Permalink
Merge pull request #535 from whole-tale/deriva_scope
Browse files Browse the repository at this point in the history
Only add new globus scopes during plugin load
  • Loading branch information
Xarthisius authored Mar 21, 2022
2 parents 0f6d1a9 + 78957b3 commit b48bf9d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
4 changes: 4 additions & 0 deletions server/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from girder.exceptions import GirderException
from girder.models.model_base import ValidationException
from girder.models.notification import Notification, ProgressState
from girder.models.setting import Setting
from girder.models.user import User
from girder.plugins.jobs.constants import JobStatus
from girder.plugins.jobs.models.job import Job as JobModel
Expand Down Expand Up @@ -494,6 +495,9 @@ def store_other_globus_tokens(event):


def load(info):
from girder.plugins.oauth.providers.globus import Globus
deriva_scopes = Setting().get(PluginSettings.DERIVA_SCOPES)
Globus.addScopes(list(deriva_scopes.values()))
info['apiRoot'].wholetale = wholeTale()
info['apiRoot'].instance = Instance()
tale = Tale()
Expand Down
7 changes: 1 addition & 6 deletions server/lib/deriva/auth.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
from girder.models.setting import Setting
from ...constants import PluginSettings, DEFAULT_DERIVA_SCOPE
from ...constants import PluginSettings
from ..verificator import Verificator

from girder.plugins.oauth.providers.globus import Globus


Globus.addScopes([DEFAULT_DERIVA_SCOPE])


class DerivaVerificator(Verificator):
def __init__(self, resource_server=None, key=None, user=None, url=None):
Expand Down

0 comments on commit b48bf9d

Please # to comment.