diff --git a/cache/locks/file/classes/privacy/provider.php b/cache/locks/file/classes/privacy/provider.php new file mode 100644 index 00000000000..a125cc5813e --- /dev/null +++ b/cache/locks/file/classes/privacy/provider.php @@ -0,0 +1,46 @@ +. + +/** + * Privacy Subsystem implementation for cachelock_file. + * + * @package cachelock_file + * @copyright 2018 Andrew Nicols + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +namespace cachelock_file\privacy; + +defined('MOODLE_INTERNAL') || die(); + +/** + * Privacy Subsystem for cachelock_file implementing null_provider. + * + * @copyright 2018 Andrew Nicols + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +class provider implements \core_privacy\local\metadata\null_provider { + + /** + * Get the language string identifier with the component's language + * file to explain why this plugin stores no data. + * + * @return string + */ + public static function get_reason() : string { + return 'privacy:metadata'; + } +} diff --git a/cache/locks/file/lang/en/cachelock_file.php b/cache/locks/file/lang/en/cachelock_file.php index b57188ce58e..fa5c6df2cc7 100644 --- a/cache/locks/file/lang/en/cachelock_file.php +++ b/cache/locks/file/lang/en/cachelock_file.php @@ -23,4 +23,5 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -$string['pluginname'] = 'File locking'; \ No newline at end of file +$string['pluginname'] = 'File locking'; +$string['privacy:metadata'] = 'The File locking plugin does not store any personal data.'; diff --git a/cache/stores/apcu/classes/privacy/provider.php b/cache/stores/apcu/classes/privacy/provider.php new file mode 100644 index 00000000000..ce0998f32b8 --- /dev/null +++ b/cache/stores/apcu/classes/privacy/provider.php @@ -0,0 +1,46 @@ +. + +/** + * Privacy Subsystem implementation for cachestore_apcu. + * + * @package cachestore_apcu + * @copyright 2018 Andrew Nicols + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +namespace cachestore_apcu\privacy; + +defined('MOODLE_INTERNAL') || die(); + +/** + * Privacy Subsystem for cachestore_apcu implementing null_provider. + * + * @copyright 2018 Andrew Nicols + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +class provider implements \core_privacy\local\metadata\null_provider { + + /** + * Get the language string identifier with the component's language + * file to explain why this plugin stores no data. + * + * @return string + */ + public static function get_reason() : string { + return 'privacy:metadata'; + } +} diff --git a/cache/stores/apcu/lang/en/cachestore_apcu.php b/cache/stores/apcu/lang/en/cachestore_apcu.php index 9bdf82de226..b9ee000f541 100644 --- a/cache/stores/apcu/lang/en/cachestore_apcu.php +++ b/cache/stores/apcu/lang/en/cachestore_apcu.php @@ -30,5 +30,6 @@ $string['prefix'] = 'Prefix'; $string['prefix_help'] = 'The above prefix gets used for all keys being stored in this APC store instance. By default the database prefix is used.'; $string['prefixinvalid'] = 'The prefix you have selected is invalid. You can only use a-z A-Z 0-9-_.'; $string['prefixnotunique'] = 'The prefix you have selected is not unique. Please choose a unique prefix.'; +$string['privacy:metadata'] = 'The APC user cache (APCu) plugin stores data briefly as part of its caching functionality but this data is regularly cleared and is not sent externally in any way.'; $string['testperformance'] = 'Test performance'; $string['testperformance_desc'] = 'If enabled, APCu performance will be included when viewing the Test performance page. Enabling this on a production site is not recommended.'; diff --git a/cache/stores/file/classes/privacy/provider.php b/cache/stores/file/classes/privacy/provider.php new file mode 100644 index 00000000000..ab08c8e3dfc --- /dev/null +++ b/cache/stores/file/classes/privacy/provider.php @@ -0,0 +1,46 @@ +. + +/** + * Privacy Subsystem implementation for cachestore_file. + * + * @package cachestore_file + * @copyright 2018 Andrew Nicols + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +namespace cachestore_file\privacy; + +defined('MOODLE_INTERNAL') || die(); + +/** + * Privacy Subsystem for cachestore_file implementing null_provider. + * + * @copyright 2018 Andrew Nicols + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +class provider implements \core_privacy\local\metadata\null_provider { + + /** + * Get the language string identifier with the component's language + * file to explain why this plugin stores no data. + * + * @return string + */ + public static function get_reason() : string { + return 'privacy:metadata'; + } +} diff --git a/cache/stores/file/lang/en/cachestore_file.php b/cache/stores/file/lang/en/cachestore_file.php index f0097c250c6..27594100253 100644 --- a/cache/stores/file/lang/en/cachestore_file.php +++ b/cache/stores/file/lang/en/cachestore_file.php @@ -33,6 +33,7 @@ $string['autocreate_help'] = 'If enabled the directory specified in path will be $string['path'] = 'Cache path'; $string['path_help'] = 'The directory that should be used to store files for this cache store. If left blank (default) a directory will be automatically created in the moodledata directory. This can be used to point a file store towards a directory on a better performing drive (such as one in memory).'; $string['pluginname'] = 'File cache'; +$string['privacy:metadata'] = 'The File cache cachestore plugin stores data briefly as part of its caching functionality but this data is regularly cleared.'; $string['prescan'] = 'Prescan directory'; $string['prescan_help'] = 'If enabled the directory is scanned when the cache is first used and requests for files are first checked against the scan data. This can help if you have a slow file system and are finding that file operations are causing you a bottle neck.'; $string['singledirectory'] = 'Single directory store'; @@ -49,4 +50,4 @@ It is advisable to only turn this on if the following is true:
* directory structure is inadvisable. * - the things we are caching are more expensive to calculate, so the extra * time to computer a better hash is a worthwhile trade-off. - */ \ No newline at end of file + */ diff --git a/cache/stores/memcache/classes/privacy/provider.php b/cache/stores/memcache/classes/privacy/provider.php new file mode 100644 index 00000000000..e7e37798e5e --- /dev/null +++ b/cache/stores/memcache/classes/privacy/provider.php @@ -0,0 +1,87 @@ +. + +/** + * Privacy Subsystem implementation for cachestore_memcache. + * + * @package cachestore_memcache + * @copyright 2018 Andrew Nicols + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +namespace cachestore_memcache\privacy; + +use core_privacy\local\metadata\collection; +use core_privacy\local\request\contextlist; +use core_privacy\local\request\approved_contextlist; + +defined('MOODLE_INTERNAL') || die(); + +/** + * Privacy Subsystem for cachestore_memcache. + * + * @copyright 2018 Andrew Nicols + * @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 { + + /** + * Returns meta data about this system. + * + * @param collection $collection The initialised collection to add items to. + * @return collection A listing of user data stored through this system. + */ + public static function get_metadata(collection $collection) : collection { + $collection->add_external_location_link('memcache', [ + 'data' => 'privacy:metadata:memcache:data', + ], 'privacy:metadata:memcache'); + return $collection; + } + + /** + * Get the list of contexts that contain user information for the specified user. + * + * @param int $userid The user to search. + * @return contextlist $contextlist The contextlist containing the list of contexts used in this plugin. + */ + public static function get_contexts_for_userid(int $userid) : contextlist { + return new contextlist(); + } + + /** + * Export all user data for the specified user, in the specified contexts. + * + * @param approved_contextlist $contextlist The approved contexts to export information for. + */ + public static function export_user_data(approved_contextlist $contextlist) { + } + + /** + * Delete all use data which matches the specified deletion_criteria. + * + * @param \context $context A user context. + */ + public static function delete_data_for_all_users_in_context(\context $context) { + } + + /** + * Delete all user data for the specified user, in the specified contexts. + * + * @param approved_contextlist $contextlist The approved contexts and user information to delete information for. + */ + public static function delete_data_for_user(approved_contextlist $contextlist) { + } +} diff --git a/cache/stores/memcache/lang/en/cachestore_memcache.php b/cache/stores/memcache/lang/en/cachestore_memcache.php index 62ef3fe229b..9095825b4c8 100644 --- a/cache/stores/memcache/lang/en/cachestore_memcache.php +++ b/cache/stores/memcache/lang/en/cachestore_memcache.php @@ -39,6 +39,8 @@ $string['prefix_help'] = 'This prefix is used for all key names on the memcache * If you only have one Moodle instance using this server, you can leave this value default. * Due to key length restrictions, a maximum of 5 characters is permitted.'; $string['prefixinvalid'] = 'Invalid prefix. You can only use a-z A-Z 0-9-_.'; +$string['privacy:metadata:memcache'] = 'The Memcache cachestore plugin stores data briefly as part of its caching functionality. This data is stored on an Memcache server where data is regularly removed.'; +$string['privacy:metadata:memcache:data'] = 'The various data stored in the cache'; $string['servers'] = 'Servers'; $string['servers_help'] = 'This sets the servers that should be utilised by this memcache adapter. Servers should be defined one per line and consist of a server address and optionally a port and weight. diff --git a/cache/stores/memcached/classes/privacy/provider.php b/cache/stores/memcached/classes/privacy/provider.php new file mode 100644 index 00000000000..932e2cadf50 --- /dev/null +++ b/cache/stores/memcached/classes/privacy/provider.php @@ -0,0 +1,87 @@ +. + +/** + * Privacy Subsystem implementation for cachestore_memcached. + * + * @package cachestore_memcached + * @copyright 2018 Andrew Nicols + * @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; + +defined('MOODLE_INTERNAL') || die(); + +/** + * Privacy Subsystem for cachestore_memcached. + * + * @copyright 2018 Andrew Nicols + * @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 { + + /** + * Returns meta data about this system. + * + * @param collection $collection The initialised collection to add items to. + * @return collection A listing of user data stored through this system. + */ + public static function get_metadata(collection $collection) : collection { + $collection->add_external_location_link('memcached', [ + 'data' => 'privacy:metadata:memcached:data', + ], 'privacy:metadata:memcached'); + return $collection; + } + + /** + * Get the list of contexts that contain user information for the specified user. + * + * @param int $userid The user to search. + * @return contextlist $contextlist The contextlist containing the list of contexts used in this plugin. + */ + public static function get_contexts_for_userid(int $userid) : contextlist { + return new contextlist(); + } + + /** + * Export all user data for the specified user, in the specified contexts. + * + * @param approved_contextlist $contextlist The approved contexts to export information for. + */ + public static function export_user_data(approved_contextlist $contextlist) { + } + + /** + * Delete all use data which matches the specified deletion_criteria. + * + * @param \context $context A user context. + */ + public static function delete_data_for_all_users_in_context(\context $context) { + } + + /** + * Delete all user data for the specified user, in the specified contexts. + * + * @param approved_contextlist $contextlist The approved contexts and user information to delete information for. + */ + public static function delete_data_for_user(approved_contextlist $contextlist) { + } +} diff --git a/cache/stores/memcached/lang/en/cachestore_memcached.php b/cache/stores/memcached/lang/en/cachestore_memcached.php index fcfb2dcfab8..e697808341f 100644 --- a/cache/stores/memcached/lang/en/cachestore_memcached.php +++ b/cache/stores/memcached/lang/en/cachestore_memcached.php @@ -54,6 +54,8 @@ If the cache is shared by other applications then each key will be deleted indiv If you are running a dedicated cache for this application then the entire cache can safely be flushed without any risk of destroying another application's cache data. This should result in increased performance when purging the cache. "; $string['pluginname'] = 'Memcached'; +$string['privacy:metadata:memcached'] = 'The Memcached cachestore plugin stores data briefly as part of its caching functionality. This data is stored on an Memcache server where data is regularly removed.'; +$string['privacy:metadata:memcached:data'] = 'The various data stored in the cache'; $string['prefix'] = 'Prefix key'; $string['prefix_help'] = 'This can be used to create a "domain" for your item keys allowing you to create multiple memcached stores on a single memcached installation. It cannot be longer than 16 characters in order to ensure key length issues are not encountered.'; $string['prefixinvalid'] = 'Invalid prefix. You can only use a-z A-Z 0-9-_.'; diff --git a/cache/stores/mongodb/classes/privacy/provider.php b/cache/stores/mongodb/classes/privacy/provider.php new file mode 100644 index 00000000000..c16d2000680 --- /dev/null +++ b/cache/stores/mongodb/classes/privacy/provider.php @@ -0,0 +1,87 @@ +. + +/** + * Privacy Subsystem implementation for cachestore_mongodb. + * + * @package cachestore_mongodb + * @copyright 2018 Andrew Nicols + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +namespace cachestore_mongodb\privacy; + +use core_privacy\local\metadata\collection; +use core_privacy\local\request\contextlist; +use core_privacy\local\request\approved_contextlist; + +defined('MOODLE_INTERNAL') || die(); + +/** + * Privacy Subsystem for cachestore_mongodb. + * + * @copyright 2018 Andrew Nicols + * @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 { + + /** + * Returns meta data about this system. + * + * @param collection $collection The initialised collection to add items to. + * @return collection A listing of user data stored through this system. + */ + public static function get_metadata(collection $collection) : collection { + $collection->add_external_location_link('mongodb', [ + 'data' => 'privacy:metadata:mongodb:data', + ], 'privacy:metadata:mongodb'); + return $collection; + } + + /** + * Get the list of contexts that contain user information for the specified user. + * + * @param int $userid The user to search. + * @return contextlist $contextlist The contextlist containing the list of contexts used in this plugin. + */ + public static function get_contexts_for_userid(int $userid) : contextlist { + return new contextlist(); + } + + /** + * Export all user data for the specified user, in the specified contexts. + * + * @param approved_contextlist $contextlist The approved contexts to export information for. + */ + public static function export_user_data(approved_contextlist $contextlist) { + } + + /** + * Delete all use data which matches the specified deletion_criteria. + * + * @param \context $context A user context. + */ + public static function delete_data_for_all_users_in_context(\context $context) { + } + + /** + * Delete all user data for the specified user, in the specified contexts. + * + * @param approved_contextlist $contextlist The approved contexts and user information to delete information for. + */ + public static function delete_data_for_user(approved_contextlist $contextlist) { + } +} diff --git a/cache/stores/mongodb/lang/en/cachestore_mongodb.php b/cache/stores/mongodb/lang/en/cachestore_mongodb.php index 90f99123b30..d0ca148c5a1 100644 --- a/cache/stores/mongodb/lang/en/cachestore_mongodb.php +++ b/cache/stores/mongodb/lang/en/cachestore_mongodb.php @@ -30,6 +30,8 @@ $string['password'] = 'Password'; $string['password_help'] = 'The password of the user being used for the connection.'; $string['pleaseupgrademongo'] = 'You are using an old version of the PHP Mongo extension (< 1.3). Support for old versions of the Mongo extension will be dropped in the future. Please consider upgrading.'; $string['pluginname'] = 'MongoDB'; +$string['privacy:metadata:mongodb'] = 'The MongoDB cachestore plugin stores data briefly as part of its caching functionality. This data is stored on an MongoDB server where data is regularly removed.'; +$string['privacy:metadata:mongodb:data'] = 'The various data stored in the cache'; $string['replicaset'] = 'Replica set'; $string['replicaset_help'] = 'The name of the replica set to connect to. If this is given the master will be determined by using the ismaster database command on the seeds, so the driver may end up connecting to a server that was not even listed.'; $string['server'] = 'Server'; diff --git a/cache/stores/redis/classes/privacy/provider.php b/cache/stores/redis/classes/privacy/provider.php new file mode 100644 index 00000000000..20defff432f --- /dev/null +++ b/cache/stores/redis/classes/privacy/provider.php @@ -0,0 +1,87 @@ +. + +/** + * Privacy Subsystem implementation for cachestore_redis. + * + * @package cachestore_redis + * @copyright 2018 Andrew Nicols + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +namespace cachestore_redis\privacy; + +use core_privacy\local\metadata\collection; +use core_privacy\local\request\contextlist; +use core_privacy\local\request\approved_contextlist; + +defined('MOODLE_INTERNAL') || die(); + +/** + * Privacy Subsystem for cachestore_redis. + * + * @copyright 2018 Andrew Nicols + * @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 { + + /** + * Returns meta data about this system. + * + * @param collection $collection The initialised collection to add items to. + * @return collection A listing of user data stored through this system. + */ + public static function get_metadata(collection $collection) : collection { + $collection->add_external_location_link('redis', [ + 'data' => 'privacy:metadata:redis:data', + ], 'privacy:metadata:redis'); + return $collection; + } + + /** + * Get the list of contexts that contain user information for the specified user. + * + * @param int $userid The user to search. + * @return contextlist $contextlist The contextlist containing the list of contexts used in this plugin. + */ + public static function get_contexts_for_userid(int $userid) : contextlist { + return new contextlist(); + } + + /** + * Export all user data for the specified user, in the specified contexts. + * + * @param approved_contextlist $contextlist The approved contexts to export information for. + */ + public static function export_user_data(approved_contextlist $contextlist) { + } + + /** + * Delete all use data which matches the specified deletion_criteria. + * + * @param \context $context A user context. + */ + public static function delete_data_for_all_users_in_context(\context $context) { + } + + /** + * Delete all user data for the specified user, in the specified contexts. + * + * @param approved_contextlist $contextlist The approved contexts and user information to delete information for. + */ + public static function delete_data_for_user(approved_contextlist $contextlist) { + } +} diff --git a/cache/stores/redis/lang/en/cachestore_redis.php b/cache/stores/redis/lang/en/cachestore_redis.php index 26aad4e9aa2..0d155be68ba 100644 --- a/cache/stores/redis/lang/en/cachestore_redis.php +++ b/cache/stores/redis/lang/en/cachestore_redis.php @@ -30,6 +30,8 @@ $string['prefix_help'] = 'This prefix is used for all key names on the Redis ser * If you only have one Moodle instance using this server, you can leave this value default. * Due to key length restrictions, a maximum of 5 characters is permitted.'; $string['prefixinvalid'] = 'Invalid prefix. You can only use a-z A-Z 0-9-_.'; +$string['privacy:metadata:redis'] = 'The Redis cachestore plugin stores data briefly as part of its caching functionality. This data is stored on an Redis server where data is regularly removed.'; +$string['privacy:metadata:redis:data'] = 'The various data stored in the cache'; $string['serializer_igbinary'] = 'The igbinary serializer.'; $string['serializer_php'] = 'The default PHP serializer.'; $string['server'] = 'Server'; diff --git a/cache/stores/session/classes/privacy/provider.php b/cache/stores/session/classes/privacy/provider.php new file mode 100644 index 00000000000..e7e16440759 --- /dev/null +++ b/cache/stores/session/classes/privacy/provider.php @@ -0,0 +1,85 @@ +. + +/** + * Privacy Subsystem implementation for cachestore_session. + * + * @package cachestore_session + * @copyright 2018 Andrew Nicols + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +namespace cachestore_session\privacy; + +use core_privacy\local\metadata\collection; +use core_privacy\local\request\contextlist; +use core_privacy\local\request\approved_contextlist; + +defined('MOODLE_INTERNAL') || die(); + +/** + * Privacy Subsystem for cachestore_session. + * + * @copyright 2018 Andrew Nicols + * @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 { + + /** + * Returns meta data about this system. + * + * @param collection $collection The initialised collection to add items to. + * @return collection A listing of user data stored through this system. + */ + public static function get_metadata(collection $collection) : collection { + $collection->add_subsystem_link('core_user', [], 'privacy:metadata:core_user'); + return $collection; + } + + /** + * Get the list of contexts that contain user information for the specified user. + * + * @param int $userid The user to search. + * @return contextlist $contextlist The contextlist containing the list of contexts used in this plugin. + */ + public static function get_contexts_for_userid(int $userid) : contextlist { + return new contextlist(); + } + + /** + * Export all user data for the specified user, in the specified contexts. + * + * @param approved_contextlist $contextlist The approved contexts to export information for. + */ + public static function export_user_data(approved_contextlist $contextlist) { + } + + /** + * Delete all use data which matches the specified deletion_criteria. + * + * @param \context $context A user context. + */ + public static function delete_data_for_all_users_in_context(\context $context) { + } + + /** + * Delete all user data for the specified user, in the specified contexts. + * + * @param approved_contextlist $contextlist The approved contexts and user information to delete information for. + */ + public static function delete_data_for_user(approved_contextlist $contextlist) { + } +} diff --git a/cache/stores/session/lang/en/cachestore_session.php b/cache/stores/session/lang/en/cachestore_session.php index 80b9c810f2c..c6416b2cc6f 100644 --- a/cache/stores/session/lang/en/cachestore_session.php +++ b/cache/stores/session/lang/en/cachestore_session.php @@ -28,4 +28,5 @@ defined('MOODLE_INTERNAL') || die(); -$string['pluginname'] = 'Session cache'; \ No newline at end of file +$string['pluginname'] = 'Session cache'; +$string['privacy:metadata:core_user'] = 'The Session cachestore plugin stores data briefly as part of its caching functionality. This data is stored in the short-lived user session.'; diff --git a/cache/stores/static/classes/privacy/provider.php b/cache/stores/static/classes/privacy/provider.php new file mode 100644 index 00000000000..3e994ee5aab --- /dev/null +++ b/cache/stores/static/classes/privacy/provider.php @@ -0,0 +1,46 @@ +. + +/** + * Privacy Subsystem implementation for cachestore_static. + * + * @package cachestore_static + * @copyright 2018 Andrew Nicols + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +namespace cachestore_static\privacy; + +defined('MOODLE_INTERNAL') || die(); + +/** + * Privacy Subsystem for cachestore_static implementing null_provider. + * + * @copyright 2018 Andrew Nicols + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +class provider implements \core_privacy\local\metadata\null_provider { + + /** + * Get the language string identifier with the component's language + * file to explain why this plugin stores no data. + * + * @return string + */ + public static function get_reason() : string { + return 'privacy:metadata'; + } +} diff --git a/cache/stores/static/lang/en/cachestore_static.php b/cache/stores/static/lang/en/cachestore_static.php index b43399998cb..ec687b9cea7 100644 --- a/cache/stores/static/lang/en/cachestore_static.php +++ b/cache/stores/static/lang/en/cachestore_static.php @@ -28,4 +28,5 @@ defined('MOODLE_INTERNAL') || die(); -$string['pluginname'] = 'Static request cache'; \ No newline at end of file +$string['pluginname'] = 'Static request cache'; +$string['privacy:metadata'] = 'The Static request cachestore plugin stores some data, but this is only present for the lifetime of a single HTTP request.';