-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OneDrive integration #6073
base: develop
Are you sure you want to change the base?
OneDrive integration #6073
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,3 +18,9 @@ file_system: | |
# sky_drive: | ||
# :client_id: YOUR_MS_LIVE_CONNECT_CLIENT_ID | ||
# :client_secret: YOUR_MS_LIVE_CONNECT_CLIENT_SECRET | ||
# sharepoint: | ||
# client_id: YOUR_MICROSOFT_GRAPH_CLIENT_ID | ||
# client_secret: YOUR_MICROSOFT_GRAPH_CLIENT_SECRET | ||
# tenant_id: YOUR_MICROSOFT_GRAPH_TENANT_ID | ||
# scope: offline_access https://graph.microsoft.com/.default | ||
# redirect_uri: https://example.com/browse/connect | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,5 +11,14 @@ | |
else | ||
settings['file_system'] = { name: 'File Dropbox', home: Settings.dropbox.path } | ||
end | ||
if Settings.dropbox.sharepoint | ||
settings['sharepoint'] = { client_id: Settings.dropbox.sharepoint.client_id, | ||
client_secret: Settings.dropbox.sharepoint.client_secret, | ||
tenant_id: Settings.dropbox.sharepoint.tenant_id, | ||
grant_type: Settings.dropbox.sharepoint.grant_type, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For current implementation this line is unneeded. However, there are a couple different ways to grant an application access to Microsoft Graph. For our purposes at IU, we need to log in as specific users which requires the For the final version of this work it would be ideal to allow implementers to choose which auth flow works best for how they have sharepoint setup so I have left the |
||
scope: Settings.dropbox.sharepoint.scope, | ||
redirect_uri: Settings.dropbox.sharepoint.redirect_uri | ||
} | ||
end | ||
BrowseEverything.configure(settings) | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kernel::open
would fail to find the sharepoint files due to our Ruby version. UsingKernel::open
to callURI.open
was removed in Ruby 3.0, so we need to explictly useURI.open
here.Although, looks like that caused a test to fail so we maybe need to implement trying
URI.open
then fallback toKernel::open
or vice versa.