diff --git a/blocks/admin_tree/block_admin_tree.php b/blocks/admin_tree/block_admin_tree.php
index <HASH>..<HASH> 100644
--- a/blocks/admin_tree/block_admin_tree.php
+++ b/blocks/admin_tree/block_admin_tree.php
@@ -22,8 +22,11 @@ class block_admin_tree extends block_base {
     }
 
     function applicable_formats() {
-        //TODO: add 'my' only if user has role assigned in system or any course category context
-        return array('site' => true, 'admin' => true, 'my' => true);
+        if (has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM))) {
+            return array('site' => true, 'admin' => true, 'my' => true);
+        } else {
+            return array('site' => true, 'admin' => true);
+        }
     }
 
     function preferred_width() {
Prevent admin tree to be showed for non-admins in 'my' page. MDL-<I> ; merged from <I>_STABLE