Skip to content

Commit

Permalink
MDL-63554 cachestore_memcached: Support for removal of context users
Browse files Browse the repository at this point in the history
This issue is part of the MDL-62560 Epic.
  • Loading branch information
rezaies authored and David Monllao committed Oct 22, 2018
1 parent b36687b commit 81684f7
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions cache/stores/memcached/classes/privacy/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,18 @@
* Privacy Subsystem implementation for cachestore_memcached.
*
* @package cachestore_memcached
* @category privacy
* @copyright 2018 Andrew Nicols <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace cachestore_memcached\privacy;

use core_privacy\local\metadata\collection;
use core_privacy\local\request\contextlist;
use core_privacy\local\request\approved_contextlist;
use core_privacy\local\request\approved_userlist;
use core_privacy\local\request\contextlist;
use core_privacy\local\request\userlist;

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

Expand All @@ -36,7 +39,10 @@
* @copyright 2018 Andrew Nicols <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class provider implements \core_privacy\local\metadata\provider, \core_privacy\local\request\plugin\provider {
class provider implements
\core_privacy\local\metadata\provider,
\core_privacy\local\request\plugin\provider,
\core_privacy\local\request\core_userlist_provider {

/**
* Returns meta data about this system.
Expand All @@ -61,6 +67,14 @@ public static function get_contexts_for_userid(int $userid) : contextlist {
return new contextlist();
}

/**
* Get the list of users who have data within a context.
*
* @param userlist $userlist The userlist containing the list of users who have data in this context/plugin combination.
*/
public static function get_users_in_context(userlist $userlist) {
}

/**
* Export all user data for the specified user, in the specified contexts.
*
Expand All @@ -84,4 +98,12 @@ public static function delete_data_for_all_users_in_context(\context $context) {
*/
public static function delete_data_for_user(approved_contextlist $contextlist) {
}

/**
* Delete multiple users within a single context.
*
* @param approved_userlist $userlist The approved context and user information to delete information for.
*/
public static function delete_data_for_users(approved_userlist $userlist) {
}
}

0 comments on commit 81684f7

Please sign in to comment.