Skip to content

Commit c96cd71

Browse files
committed
MDL-63924 privacy: Add shared user providers to subsytsems
1 parent 44e5695 commit c96cd71

File tree

20 files changed

+80
-23
lines changed

20 files changed

+80
-23
lines changed

Diff for: admin/tool/dataprivacy/classes/metadata_registry.php

+7-1
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,17 @@ public function get_registry_metadata() {
8787
$internaldata['deprecated'] = true;
8888
}
8989

90-
// Check that the userlist provider is implemented.
90+
// Check that the core_userlist_provider is implemented for all user data providers.
9191
if ($componentclass instanceof \core_privacy\local\request\core_user_data_provider
9292
&& !$componentclass instanceof \core_privacy\local\request\core_userlist_provider) {
9393
$internaldata['userlistnoncompliance'] = true;
9494
}
95+
96+
// Check that any type of userlist_provider is implemented for all shared data providers.
97+
if ($componentclass instanceof \core_privacy\local\request\shared_data_provider
98+
&& !$componentclass instanceof \core_privacy\local\request\userlist_provider) {
99+
$internaldata['userlistnoncompliance'] = true;
100+
}
95101
}
96102
}
97103

Diff for: admin/tool/log/classes/local/privacy/logstore_userlist_provider.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@
3636
* @author Adrian Greeve <adriangreeve.com>
3737
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
3838
*/
39-
interface logstore_userlist_provider extends \core_privacy\local\request\plugin\subplugin_provider {
39+
interface logstore_userlist_provider extends
40+
\core_privacy\local\request\plugin\subplugin_provider,
41+
\core_privacy\local\request\shared_userlist_provider
42+
{
4043

4144
/**
4245
* Add user IDs that contain user information for the specified context.

Diff for: cache/classes/privacy/provider.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ class provider implements
3939
\core_privacy\local\metadata\provider,
4040

4141
// The cache subsystem stores data on behalf of other components.
42-
\core_privacy\local\request\subsystem\plugin_provider {
42+
\core_privacy\local\request\subsystem\plugin_provider,
43+
\core_privacy\local\request\shared_userlist_provider
44+
{
4345

4446
/**
4547
* Returns meta data about this system.

Diff for: comment/classes/privacy/provider.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,11 @@
3737
* @copyright 2018 Adrian Greeve <[email protected]>
3838
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
3939
*/
40-
class provider implements \core_privacy\local\metadata\provider, \core_privacy\local\request\subsystem\plugin_provider {
40+
class provider implements
41+
\core_privacy\local\metadata\provider,
42+
\core_privacy\local\request\subsystem\plugin_provider,
43+
\core_privacy\local\request\shared_userlist_provider
44+
{
4145

4246
/**
4347
* Returns meta data about this system.

Diff for: completion/classes/privacy/provider.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,11 @@
4141
* @copyright 2018 Adrian Greeve <[email protected]>
4242
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
4343
*/
44-
class provider implements \core_privacy\local\metadata\provider, \core_privacy\local\request\subsystem\plugin_provider {
44+
class provider implements
45+
\core_privacy\local\metadata\provider,
46+
\core_privacy\local\request\subsystem\plugin_provider,
47+
\core_privacy\local\request\shared_userlist_provider
48+
{
4549

4650
/**
4751
* Returns meta data about this system.

Diff for: files/classes/privacy/provider.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ class provider implements
4848
\core_privacy\local\request\subsystem\plugin_provider,
4949
\core_privacy\local\request\core_userlist_provider,
5050
// We store a userkey for token-based file access.
51-
\core_privacy\local\request\subsystem\provider {
51+
\core_privacy\local\request\subsystem\provider,
52+
\core_privacy\local\request\shared_userlist_provider {
5253

5354
/**
5455
* Returns metadata.

Diff for: grade/grading/classes/privacy/gradingform_provider_v2.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@
2626
defined('MOODLE_INTERNAL') || die();
2727

2828
interface gradingform_provider_v2 extends
29-
\core_privacy\local\request\plugin\subsystem_provider {
29+
\core_privacy\local\request\plugin\subsystem_provider,
30+
\core_privacy\local\request\shared_userlist_provider
31+
{
3032

3133
/**
3234
* Export user data relating to an instance ID.

Diff for: group/classes/privacy/provider.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ class provider implements
5151
\core_privacy\local\request\subsystem\plugin_provider,
5252

5353
// This plugin is capable of determining which users have data within it.
54-
\core_privacy\local\request\core_userlist_provider {
54+
\core_privacy\local\request\core_userlist_provider,
55+
\core_privacy\local\request\shared_userlist_provider
56+
{
5557

5658
/**
5759
* Returns meta data about this system.

Diff for: lib/userkey/classes/privacy/provider.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,11 @@
3939
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
4040
*/
4141
class provider implements
42-
\core_privacy\local\metadata\provider,
42+
\core_privacy\local\metadata\provider,
4343

44-
\core_privacy\local\request\subsystem\plugin_provider {
44+
\core_privacy\local\request\subsystem\plugin_provider,
45+
\core_privacy\local\request\shared_userlist_provider
46+
{
4547

4648
/**
4749
* Returns meta data about this system.

Diff for: mod/assign/classes/privacy/assignfeedback_user_provider.php

+5-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@
2828

2929
defined('MOODLE_INTERNAL') || die();
3030

31-
interface assignfeedback_user_provider extends \core_privacy\local\request\plugin\subplugin_provider {
31+
interface assignfeedback_user_provider extends
32+
\core_privacy\local\request\plugin\subplugin_provider,
33+
\core_privacy\local\request\shared_userlist_provider
34+
{
3235

3336
/**
3437
* If you have tables that contain userids and you can generate entries in your tables without creating an
@@ -49,4 +52,4 @@ public static function get_userids_from_context(\core_privacy\local\request\user
4952
*/
5053
public static function delete_feedback_for_grades(assign_plugin_request_data $deletedata);
5154

52-
}
55+
}

Diff for: mod/assign/classes/privacy/assignsubmission_user_provider.php

+5-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@
3030

3131
defined('MOODLE_INTERNAL') || die();
3232

33-
interface assignsubmission_user_provider extends \core_privacy\local\request\plugin\subplugin_provider {
33+
interface assignsubmission_user_provider extends
34+
\core_privacy\local\request\plugin\subplugin_provider,
35+
\core_privacy\local\request\shared_userlist_provider
36+
{
3437

3538
/**
3639
* If you have tables that contain userids and you can generate entries in your tables without creating an
@@ -51,4 +54,4 @@ public static function get_userids_from_context(userlist $userlist);
5154
*/
5255
public static function delete_submissions(assign_plugin_request_data $deletedata);
5356

54-
}
57+
}

Diff for: mod/data/classes/privacy/datafield_provider.php

+7-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,13 @@
3333
* @copyright 2018 Marina Glancy
3434
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
3535
*/
36-
interface datafield_provider extends \core_privacy\local\request\plugin\subplugin_provider {
36+
interface datafield_provider extends
37+
\core_privacy\local\request\plugin\subplugin_provider,
38+
39+
// The data subplugins do not need to do anything themselves for the shared_userlist.
40+
// This is all handled by the parent plugin.
41+
\core_privacy\local\request\shared_userlist_provider
42+
{
3743

3844
/**
3945
* Exports data about one record in {data_content} table.

Diff for: mod/workshop/classes/privacy/workshopform_provider.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@
3333
* @copyright 2018 David Mudrák <[email protected]>
3434
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
3535
*/
36-
interface workshopform_provider extends \core_privacy\local\request\plugin\subplugin_provider {
36+
interface workshopform_provider extends
37+
\core_privacy\local\request\plugin\subplugin_provider,
38+
\core_privacy\local\request\shared_userlist_provider
39+
{
3740

3841
/**
3942
* Return details of the filled assessment form.

Diff for: plagiarism/classes/privacy/plagiarims_user_provider.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@
3434
*/
3535
interface plagiarism_user_provider extends
3636
// The plagiarism_provider should be implemented by plugins which only provide information to a subsystem.
37-
\core_privacy\local\request\plugin\subsystem_provider {
37+
\core_privacy\local\request\plugin\subsystem_provider,
38+
\core_privacy\local\request\shared_userlist_provider {
3839

3940
/**
4041
* Delete all user information for the provided users and context.

Diff for: plagiarism/classes/privacy/provider.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ class provider implements
4040
\core_privacy\local\metadata\provider,
4141

4242
// The Plagiarism subsystem will be called by other components and will forward requests to each plagiarism plugin implementing its APIs.
43-
\core_privacy\local\request\subsystem\plugin_provider {
43+
\core_privacy\local\request\subsystem\plugin_provider,
44+
\core_privacy\local\request\shared_userlist_provider
45+
{
4446

4547
/**
4648
* Returns meta data about this system.

Diff for: portfolio/classes/privacy/portfolio_provider.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@
3434
*/
3535
interface portfolio_provider extends
3636
// The portfolio_provider should be implemented by plugins which only provide information to a subsystem.
37-
\core_privacy\local\request\plugin\subsystem_provider {
37+
\core_privacy\local\request\plugin\subsystem_provider,
38+
39+
// The implementation for prtfolios is handled in the subsystem itself.
40+
\core_privacy\local\request\shared_userlist_provider {
3841

3942
/**
4043
* Export all portfolio data from each portfolio plugin for the specified userid and context.

Diff for: portfolio/classes/privacy/provider.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ class provider implements
4545
\core_privacy\local\request\plugin\provider,
4646
\core_privacy\local\request\core_userlist_provider,
4747
// The portfolio subsystem will be called by other components.
48-
\core_privacy\local\request\subsystem\plugin_provider {
48+
\core_privacy\local\request\subsystem\plugin_provider,
49+
50+
\core_privacy\local\request\shared_userlist_provider {
4951

5052
/**
5153
* Returns meta data about this system.

Diff for: question/classes/privacy/provider.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,10 @@ class provider implements
6161
\core_privacy\local\request\subsystem\plugin_provider,
6262

6363
// This plugin is capable of determining which users have data within it.
64-
\core_privacy\local\request\core_userlist_provider
64+
\core_privacy\local\request\core_userlist_provider,
65+
66+
// This plugin is capable of determining which users have data within it for the plugins it provides data to.
67+
\core_privacy\local\request\shared_userlist_provider
6568
{
6669

6770
/**

Diff for: rating/classes/privacy/provider.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ class provider implements
4646
// as a result.
4747

4848
// The ratings subsystem provides a data service to other components.
49-
\core_privacy\local\request\subsystem\plugin_provider {
49+
\core_privacy\local\request\subsystem\plugin_provider,
50+
\core_privacy\local\request\shared_userlist_provider
51+
{
5052

5153
/**
5254
* Returns metadata about the ratings subsystem.

Diff for: tag/classes/privacy/provider.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,10 @@ class provider implements
5151
\core_privacy\local\request\core_userlist_provider,
5252

5353
// The tag subsystem may have data that belongs to this user.
54-
\core_privacy\local\request\plugin\provider {
54+
\core_privacy\local\request\plugin\provider,
55+
56+
\core_privacy\local\request\shared_userlist_provider
57+
{
5558

5659
/**
5760
* Returns meta data about this system.

0 commit comments

Comments
 (0)