Commit graph

131 commits

Author SHA1 Message Date
Eloy Lafuente (stronk7)
3679f3b3b7 Merge branch 'MDL-64424-master-expiredfrontpage' of git://github.com/mudrd8mz/moodle 2019-01-29 23:47:05 +01:00
David Mudrák
5f7b528281 MDL-64424 privacy: Use system context purpose on the front page, too
For activities on the site's front page, use the purpose and retention
periods as defined for the system context, not for the courses.
2019-01-23 11:13:10 +01:00
Kiet.Chan
81eb8b2bbc MDL-64323 GDPR: New request form user search not using configured fields 2019-01-16 13:34:53 +07:00
Andrew Nicols
26ce2c0a81 MDL-64030 tool_dataprivacy: Process requests when system purpose not set 2018-11-23 07:54:22 +08:00
Andrew Nicols
c083d1ad1e MDL-63960 dataprivacy: Do not perform strict type checks for id
When inherit is specified in the data registry it is stored as a
string and we cannot perform a strict comparison with it.

We should still compare strict comparison checks against null, or false,
but not for the NOTSET (0) or INHERIT values (-1).
2018-11-10 15:34:21 +08:00
Eloy Lafuente (stronk7)
baf3fd4177 MDL-63919 tool_dataprivacy: admin & notify fixes
This includes the following:

1) Replace $ADMIN->id by get_admin()->id. The former doesn't exist.
2) Only change the notify parameter when it has not been specified
   at creation time (null). If specified, observe it.
3) Set the current user in tests to admin, able to create those
   requests.
2018-11-10 02:22:12 +01:00
Andrew Nicols
56c2b941df MDL-63919 tool_dataprivacy: Notify by default 2018-11-09 18:39:42 +08:00
Eloy Lafuente (stronk7)
ba999160b4 Merge branch 'MDL-62564-master-fix' of git://github.com/andrewnicols/moodle 2018-11-09 10:59:04 +01:00
Andrew Nicols
b26c5e031b MDL-62564 tool_dataprivacy: Do not delete deleted user
This also ensures that we do not call delete_user on an already deleted
user.
2018-11-09 17:34:47 +08:00
Jun Pataleta
012fa6abc3 Merge branch 'MDL-63867-master' of git://github.com/mickhawkins/moodle 2018-11-09 15:31:28 +08:00
Michael Hawkins
95a3f78058 MDL-63867 tool_dataprivacy: Add site purpose checks to tasks
If a site purpose is not defined, requests cannot be processed.
2018-11-09 15:20:12 +08:00
Michael Hawkins
0646c8514b MDL-63867 tool_dataprivacy: Fix context expired/unprotected user check
It now checks the system context has been defined, since that is
required for data privacy to be set up correctly, and the check
to be valid. This also fixes an error being thrown when checking
pending delete requests in cron.
2018-11-09 14:19:31 +08:00
Jun Pataleta
1d2adca39b Merge branch 'MDL-63924-master' of git://github.com/andrewnicols/moodle 2018-11-09 11:57:38 +08:00
Andrew Nicols
03acfa408a MDL-63897 tool_dataprivacy: Send notifications for new requests 2018-11-09 11:25:57 +08:00
Andrew Nicols
b838d85cbc MDL-63897 dataprivacy: Kill the preprocess stage 2018-11-09 11:08:07 +08:00
Andrew Nicols
b627565e9b Merge branch 'MDL-63919-master' of git://github.com/mihailges/moodle 2018-11-09 10:51:48 +08:00
Jun Pataleta
120edbe65f Merge branch 'MDL-62589-master' of git://github.com/andrewnicols/moodle 2018-11-09 10:36:52 +08:00
Eloy Lafuente (stronk7)
3aa0cfe33e Merge branch 'MDL-62564-integration-master-1' of git://github.com/mihailges/moodle 2018-11-08 16:38:38 +01:00
Andrew Nicols
c96cd71102 MDL-63924 privacy: Add shared user providers to subsytsems 2018-11-08 21:26:18 +08:00
Mihail Geshoski
f39b579de1 MDL-63919 privacy: Store the creation method of the data request 2018-11-08 14:13:31 +08:00
Mihail Geshoski
77c21518f2 MDL-63919 privacy: Disable notifications for auto created data requests 2018-11-08 14:08:43 +08:00
Andrew Nicols
50208b5ca5 MDL-62589 dataprivacy: Add ability to resubmit a request 2018-11-08 11:45:36 +08:00
Mihail Geshoski
673d2c58fb MDL-62564 privacy: Create request for deleted users when setting enabled 2018-11-08 09:29:38 +08:00
Mihail Geshoski
b4ecfa38c2 MDL-62564 privacy: Improve bulk deletion 2018-11-08 09:28:36 +08:00
Andrew Nicols
66a47d23fa MDL-63902 dataprivacy: Check course children not the course
When checking the expiry and protected state of a context, we need to do
so knowing what kind of use that context has.

If it is used in the user context, then only the user context matters.
If it is used within a course, then that child context must be checked
in relation to the course.
2018-11-08 09:13:15 +08:00
Andrew Nicols
4c1fc0b6d6 MDL-62589 dataprivacy: Correct not in sql 2018-11-07 19:24:07 +08:00
Mihail Geshoski
c13c4569a9 MDL-62563 privacy: Create delete data request for existing deleted users 2018-11-05 16:20:37 +08:00
Adrian Greeve
7a35413d16 MDL-63566 tool_dataprivacy: New interface check for userlist.
This adds another check to see if the plugins are implementing the
new core_userlist_provider.
2018-11-01 10:06:45 +08:00
Andrew Nicols
d95ad08f85 MDL-63619 tool_dataprivacy: Cache purposes in form 2018-10-24 08:48:18 +08:00
Andrew Nicols
3b002c86eb MDL-63619 tool_dataprivacy: Performance improvement 2018-10-24 08:48:18 +08:00
Andrew Nicols
d2aed78933 MDL-63619 tool_dataprivacy: Fix inheritance from parent contexts
Inheritance should behave such that all contexts inherit from their
parent context.

Prior to this fix, if the value was not set on a context, then it was
getting a default of 'Inherit', but instead of inheritting from the
parent context, it was inheritting from its parent context _level_ which
is just wrong.
2018-10-24 08:48:18 +08:00
Andrew Nicols
9e217d8441 MDL-62560 tool_dataprivacy: Add a purpose override cache 2018-10-22 12:50:16 +02:00
Andrew Nicols
b519dab3bd MDL-62560 tool_dataprivacy: Fetch user purpose once 2018-10-22 12:50:16 +02:00
Andrew Nicols
a1d51ad8c6 MDL-62560 tool_dataprivacy: Add status logging 2018-10-22 12:50:16 +02:00
Michael Hawkins
dcdd4f1053 MDL-63497 tool_dataprivacy: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-22 12:48:32 +02:00
Andrew Nicols
bf347c4d2b MDL-63496 tool_dataprivacy: Add configuration for per-role retention
This issue is a part of the MDL-62560 Epic.
2018-10-17 13:12:18 +08:00
Andrew Nicols
b107016c88 MDL-63496 tool_dataprivacy: Respect expiry with protected flag
This issue is a part of the MDL-62560 Epic.
2018-10-17 13:12:18 +08:00
Andrew Nicols
8c634d6d4f MDL-63496 tool_dataprivacy: Support for per-role retention
This issue is a part of the MDL-62560 Epic.
2018-10-17 13:12:18 +08:00
Eloy Lafuente (stronk7)
bf0072e6c3 Merge branch 'MDL-63401-master' of git://github.com/andrewnicols/moodle 2018-10-09 11:35:29 +02:00
Andrew Nicols
9a8944c52d MDL-63401 tool_dataprivacy: Simplify where processing 2018-10-09 08:21:38 +08:00
Andrew Nicols
7200ab20cd MDL-63401 tool_dataprivacy: Move final cap check to endpoint 2018-10-09 08:21:25 +08:00
Andrew Nicols
65f77d319e MDL-63401 tool_dataprivacy: Allow expiriration of users without end date 2018-10-08 20:49:59 +08:00
Andrew Nicols
2136ec3da3 MDL-63401 tool_dataprivacy: Rewrite expired deletion handling
This change rewrites the way in which expiry is calculated and addresses
a number of closely related issues:

Users can customise, and add blocks with data to, their dashboard.  When
a user had done so, the user could be flagged for deletion, but the
blocks in their Dashboard were subject to the default block retention
policy. In addition there is no way to override the retention policy for
user blocks.

This change modifies the structure of the expiry mechanism:
- to consider any subcontext of the user context to be a part of the user
  context during calculation. User child contexts are not the property
  of the system, and should not be treated separately.
- the way in which the context expiry mechanism worked was to select
  use a multiple different managers based solely on the context level.
  Because of the use of user blocks, this proved to be unreliable as
  blocks has been attributed purely to courses.
  This has been changed to a single manager which is aware of hierarchy
  and deletions as a whole.
- to prepare for upcoming work relating to more detailed expiry
  mechanisms, a new expiry_info class is introduced and used to
  merge the expiry of child contexts into a working in-memory view.

This changeset includes extensive unit tests.
2018-10-08 20:49:55 +08:00
Andrew Nicols
cbae8dcd57 MDL-63401 tool_dataprivacy: Move cap checks to endpoints from API 2018-10-08 20:49:17 +08:00
David Monllao
1ef89ad49c Merge branch 'mdl63334-master' of https://github.com/tlock/moodle 2018-10-03 17:19:18 +02:00
Adrian Greeve
edbdeb6315 MDL-62558 tool_dataprivacy: Create a summary page for users. 2018-10-03 10:16:25 +08:00
Eloy Lafuente (stronk7)
4cde0a5212 Merge branch 'MDL-63116-master-1' of git://github.com/mihailges/moodle 2018-09-18 23:26:51 +02:00
Mihail Geshoski
457047de6c MDL-61908 privacy: Fix heading in data privacy pages 2018-09-18 18:49:04 +02:00
Eloy Lafuente (stronk7)
4ab33be074 Merge branch 'MDL-63009-master' of git://github.com/mickhawkins/moodle 2018-09-17 23:30:13 +02:00
Eloy Lafuente (stronk7)
01d7b4b6dd Merge branch 'MDL-63184-master-2' of git://github.com/junpataleta/moodle 2018-09-17 23:10:39 +02:00