Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
smoyte committed Aug 21, 2024
1 parent e180a5e commit bd9d83f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/controllers/gdrive/browse_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,14 @@ def index

@migration_operation = MigrationConfig.find_by(community: current_community)&.active_operation

# Note that we use the org_user here and not the current_user's Google Account by design,
# because we want to enable browsing (and possibly later other interactions) with Google
# Drive content without forcing people to have a Google Account. Read permissions are
# thus determined via Groups. If the user is in a Group that is connected to an Item,
# we show it to them.
wrapper = Wrapper.new(config: @config, google_user_id: @config.org_user_id,
callback_url: gdrive_setup_auth_callback_url(host: Settings.url.host))

unless wrapper.has_credentials?
setup_auth_url(wrapper: wrapper)
# If there are any items then this community has probably connected before but maybe
Expand Down

0 comments on commit bd9d83f

Please sign in to comment.