MDL-69204 tool_dataprivacy: summary link only on current user profile.
authorPaul Holden <paulh@moodle.com>
Tue, 7 Jul 2020 12:44:10 +0000 (13:44 +0100)
committerPaul Holden <paulh@moodle.com>
Mon, 27 Jul 2020 16:25:09 +0000 (17:25 +0100)
admin/tool/dataprivacy/lib.php

index c069301..5b5f28a 100644 (file)
@@ -95,7 +95,7 @@ function tool_dataprivacy_myprofile_navigation(tree $tree, $user, $iscurrentuser
         $showsummary = true;
     }
 
-    if ($showsummary) {
+    if ($showsummary && $iscurrentuser) {
         $summaryurl = new moodle_url('/admin/tool/dataprivacy/summary.php');
         $summarynode = new core_user\output\myprofile\node('privacyandpolicies', 'retentionsummary',
             get_string('dataretentionsummary', 'tool_dataprivacy'), null, $summaryurl);