Skip to content

Commit

Permalink
Only add new globus scopes during plugin load
Browse files Browse the repository at this point in the history
Fixes #534 (for now...)
  • Loading branch information
Xarthisius committed May 19, 2022
1 parent ea29288 commit 66b8d95
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 66b8d95

Please sign in to comment.