83482 Commits

Author SHA1 Message Date
Damyon Wiese
c21a66e40a MDL-58220 auth_oauth2: Restrict logins to a set of domains
This is set on the issuer, so you can have different lists for each oauth2 provider.
2017-04-03 13:43:25 +08:00
Damyon Wiese
979d1f66dd MDL-58220 auth_oauth2: Fix new account creation
This was not allowing new accounts to be registered.
2017-04-03 13:41:19 +08:00
Damyon Wiese
eca128bf47 MDL-58220 oauth2: Global enable/disable for issuers. 2017-04-03 13:41:19 +08:00
Damyon Wiese
6e0d700de8 MDL-58220 assign: Only show write access to teachers
In filebrowser api - this is also used by repositories using controlled links.
2017-04-03 13:41:19 +08:00
Damyon Wiese
ffda3e395c MDL-58127 skydrive: Upgrades to new oauth2
Support for controlled links workflow.

Part of MDL-58220
2017-04-03 13:41:19 +08:00
Damyon Wiese
af28b22892 MDL-58219 googledocs: Use google file extensions
Only rename on export for download.

Part of MDL-58220
2017-04-03 13:41:19 +08:00
Damyon Wiese
72643dc688 MDL-58219 googledocs: Update to new model for controlledlinks
Part of MDL-58220
2017-04-03 13:41:19 +08:00
Damyon Wiese
141ee541ca MDL-58219 repository: Change how controlled links work
Files are copied to the system user as soon as they are uploaded. Write access is then controlled when
serving links to the file.

Part of MDL-58220
2017-04-03 13:41:19 +08:00
Damyon Wiese
72fd103add MDL-58219 cibot: Fixes
Fixes for cibot warnings.

Part of MDL-58220
2017-04-03 13:41:19 +08:00
Damyon Wiese
dece386586 MDL-58219 oauth2: Fix unit tests because we changed the model
We added 2 fields to the model and we needed to update the tests.

I also removed some error_log from the rest client (very useful while developing)

Part of MDL-58220
2017-04-03 13:41:18 +08:00
Damyon Wiese
ec504d94f6 MDL-58219 googledocs: Fix upgrade script nesting
Part of MDL-58220
2017-04-03 13:41:18 +08:00
Damyon Wiese
3739559644 MDL-58219 workshop: Fix unit tests
The bug is caused by the new code to freeze the files in the fileareas when switching phases.

Part of MDL-58220
2017-04-03 13:41:18 +08:00
Damyon Wiese
39f60f6c00 MDL-58219 googledocs: Use a cache
Speed up folder operations with a simple cache.

Part of MDL-58220
2017-04-03 13:41:18 +08:00
Damyon Wiese
6da1c55ba8 MDL-58219 googledocs: Keep original name on copy
Also - only add writers to files that have been "claimed" (prevent_changes_to_external_files)

Part of MDL-58220
2017-04-03 13:41:18 +08:00
Damyon Wiese
2fad141006 MDL-58219 oauth2: Fix token upgrade problem with incremental auth
Part of MDL-58220
2017-04-03 13:41:18 +08:00
Damyon Wiese
28dddbc129 MDL-58219 oauth2: Show connected system account info
Show the username and email of the connected system account (if it ever requires refreshing - this will help identity the account
to re-authorise).

Part of MDL-58220
2017-04-03 13:41:18 +08:00
Damyon Wiese
1a1a09d8f8 MDL-58142 calendar: Add an obvious link to the help docs
Part of MDL-58220
2017-04-03 13:40:13 +08:00
Damyon Wiese
5823a27e7e MDL-58131 googledocs: Add manage url -> drive
Part of MDL-58220
2017-04-03 13:40:13 +08:00
Damyon Wiese
5ffaf17dad MDL-58168 oauth2: Check for new access code before checking scopes
Part of MDL-58220
2017-04-03 13:40:13 +08:00
Damyon Wiese
1dca8d1a1d MDL-58168 auth_oauth2: Allow linking other accounts
Part of MDL-58220
2017-04-03 13:40:13 +08:00
Damyon Wiese
151b0f9409 MDL-58132 repositories: Controlled link file type
This introduces a new "controlled link" file type where the file is not
stored in Moodle - but Moodle will control the access permissions on the file.

Plugins can "freeze" a filearea which means Moodle will take ownership of all the remote
files of this type.

When accessing a file, if the "filebrowser" infomation indicates the current user can write to the file, they
will be granted temporary write access.

Part of MDL-58220
2017-04-03 13:40:13 +08:00
Damyon Wiese
8ece1d70d8 MDL-58128 googledocs: Don't copy files
When linking - add the moodle account to the file and
organise it on the moodle side. Also allow read access with link,
but don't make any other changes to the perm/ownership.

Part of MDL-58220
2017-04-03 13:40:13 +08:00
Damyon Wiese
989e14fea0 MDL-58128 googledocs: Support reference files.
Add options so the admin can control the types of files this repository can support (and the default).

Part of MDL-58220
2017-04-03 13:40:13 +08:00
Damyon Wiese
6c9cd495a2 MDL-58128 googledocs: Upgrade repo config
Part of MDL-58220
2017-04-03 13:40:13 +08:00
Damyon Wiese
d247a63dfa MDL-58128 oauth2: Add a scheduled task for refresh
We need to make sure our refresh tokens do not expire. We run a scheduled
task to update the refresh token once per hour.

Part of MDL-58220
2017-04-03 13:40:13 +08:00
Damyon Wiese
0e59638bdb MDL-58126 googledocs: Re-implement the google docs repo
Use latest REST API (v3) - but avoid the google client libraries
(too big, too much to update, not integrated with auth).

Part of MDL-58220
2017-04-03 13:40:13 +08:00
Damyon Wiese
299112498b MDL-58090 oauth2: Coding style
Part of MDL-58220
2017-04-03 13:40:13 +08:00
Damyon Wiese
870a4a824e MDL-58090 oauth2: Improve help
Provide a link to the help for setting up an OAuth 2 service.

Part of MDL-58220
2017-04-03 13:40:13 +08:00
Damyon Wiese
722a6d0881 MDL-58090 oauth2: Remove wrong tests from branch
Part of MDL-58220
2017-04-03 13:40:13 +08:00
Damyon Wiese
931c023468 MDL-58090 oauth2: Add unit tests
Part of MDL-58220
2017-04-03 13:40:13 +08:00
Damyon Wiese
f9f243f93e MDL-58090 oauth2: Complete phpdocs
Part of MDL-58220
2017-04-03 13:40:13 +08:00
Damyon Wiese
2b09b2daa3 MDL-58090 oauth2: Load and resave the DB files
Edit the DB files with XMLDB to detect/fix errors.

Part of MDL-58220
2017-04-03 13:40:12 +08:00
Damyon Wiese
dc4b56852a MDL-58090 oauth2: Do not install services by default
Instead provide buttons to quickly create pre-configured
versions of any of the known OAuth 2 services.

Part of MDL-58220
2017-04-03 13:40:12 +08:00
Damyon Wiese
237fd80cd2 MDL-58090 oauth2: API to get a system client
Request an oauth client with an access token retrieved with the stored refresh token from the OAuth issuer.

Part of MDL-58220
2017-04-03 13:39:45 +08:00
Damyon Wiese
ddf65b8c05 MDL-58090 oauth2: Facebook
Add defaults for facebook authentication and drop behaviour field completely.

Part of MDL-58220
2017-04-03 13:39:45 +08:00
Damyon Wiese
485a22fc98 MDL-58090 oauth2: Get rid of behaviour field
OAuth services working fully from config - no more subclasses for each OAuth issuer.

Part of MDL-58220
2017-04-03 13:39:44 +08:00
Damyon Wiese
8445556b4c MDL-58090 oauth2: Move code from subclasses to config
Allow the behaviour of each oauth service to be customised by config instead of
subclasses.

Part of MDL-58220
2017-04-03 13:39:44 +08:00
Damyon Wiese
60237253a2 MDL-58090 oauth2: Store a list of oauth2 services
Build an admin page where OAuth 2 services can be installed and configured.

Part of MDL-58220
2017-04-03 13:39:02 +08:00
Dan Poltawski
bf919ddf02 weekly release 3.3dev 2017-03-31 09:16:27 +01:00
Dan Poltawski
0e4530f0fd Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2017-03-31 09:16:24 +01:00
Dan Poltawski
acfab4cc7b Merge branch 'MDL-58450_master' of git://github.com/dmonllao/moodle 2017-03-31 09:12:16 +01:00
David Monllao
1535cd5bad MDL-58450 mod_forum: Force groups to be returned as they are created
Long history resumed: The test relies on the first group
being the first that is created, the first group is
actually the first one ordering by name. If  is
group-999 and  is group-1000  is returned
as the first group.
2017-03-31 01:44:21 +02:00
Juan Leyva
b0f3e6d618 MDL-57924 mod_data: Fix get_entry call
It was using the pre-integration version where a group was mandatory
2017-03-30 09:29:08 +02:00
Juan Leyva
8cc04bcc67 MDL-57920 mod_data: Fix var dynamic creation (failing in php7) 2017-03-30 09:26:27 +02:00
Juan Leyva
57ab070e01 MDL-57925 mod_data: Implement check_updates_since callback 2017-03-30 03:41:55 +02:00
Juan Leyva
01b7ec36d1 MDL-57925 mod_data: Support new search criteria 2017-03-30 03:19:45 +02:00
Juan Leyva
4ca2890d8e MDL-57924 mod_data: New WS mod_data_update_entry 2017-03-30 02:36:32 +02:00
Juan Leyva
df0c549f88 MDL-57924 mod_data: Move update record code to new function 2017-03-30 02:35:59 +02:00
Juan Leyva
61c640c13a MDL-57923 mod_data: New WS mod_data_add_entry 2017-03-30 02:28:54 +02:00
Juan Leyva
b376f55e59 MDL-57923 mod_data: Move entry creation code to function 2017-03-30 02:26:11 +02:00