From aeea0b150223b32e2f68addefdb85916ce0fd30d Mon Sep 17 00:00:00 2001 From: Kevin Pham Date: Thu, 1 Jul 2021 14:25:03 +1000 Subject: [PATCH] MDL-49795 auth_oauth2: Add missing metadata providers for oauth2 tables --- auth/oauth2/classes/privacy/provider.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/auth/oauth2/classes/privacy/provider.php b/auth/oauth2/classes/privacy/provider.php index f5130ae4794..c60abc69ab4 100644 --- a/auth/oauth2/classes/privacy/provider.php +++ b/auth/oauth2/classes/privacy/provider.php @@ -64,6 +64,20 @@ class provider implements ]; $collection->add_database_table('auth_oauth2_linked_login', $authfields, 'privacy:metadata:auth_oauth2:tableexplanation'); + + // Regarding this block, we are unable to export or purge this data, as + // it would damage the oauth2 data across the whole site. + foreach ([ + 'oauth2_endpoint', + 'oauth2_user_field_mapping', + 'oauth2_access_token', + 'oauth2_system_account', + ] as $tablename) { + $collection->add_database_table($tablename, [ + 'usermodified' => 'privacy:metadata:auth_oauth2:usermodified', + ], 'privacy:metadata:auth_oauth2:tableexplanation'); + } + $collection->link_subsystem('core_auth', 'privacy:metadata:auth_oauth2:authsubsystem'); return $collection;