Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Only add new globus scopes during plugin load #535

Merged
merged 1 commit into from
Mar 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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