]> git.mjollnir.org Git - moodle.git/commit
blocks/admin_tree: Show the block if some admin privs present...
authormartinlanghoff <martinlanghoff>
Wed, 19 Sep 2007 07:46:24 +0000 (07:46 +0000)
committermartinlanghoff <martinlanghoff>
Wed, 19 Sep 2007 07:46:24 +0000 (07:46 +0000)
commit0146bd4190932cd255c607c2ca5421e368b9201c
treecab78c87fb666de2e44c8af45d1c69a7ab3a0ea8
parent18b1d848202a00dae86c1e6882d0241b0d836564
blocks/admin_tree: Show the block if some admin privs present...

Dan Poltawski said:
> Previously users with different permissions could have granular
> access to the admin menu for the items they have access to, so
> limiting to only users with moodle/site:config would break that.
> Although I agree that that menu is slowww to render and needs
> fixing. Perhaps permissions for the various elements could be
> gathered and checked first

This commit addresses the problem checking for all the caps that are
mentioned by code in /admin (according to grep, at least). Some light
testing with the "moodle/user:create" seems to work properly.

This burdens us with maintaining the list in has_admin_caps() -- less
than ideal, but easier than rewriting /admin.
blocks/admin_tree/block_admin_tree.php