Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

settings.php needs $assiteconfig instead of is_siteadmin() #10

Open
andreasschenkel opened this issue May 24, 2020 · 2 comments
Open

settings.php needs $assiteconfig instead of is_siteadmin() #10

andreasschenkel opened this issue May 24, 2020 · 2 comments

Comments

@andreasschenkel
Copy link
Contributor

The main admin-account can config the template4u plugin. We have another adminrole that has not enough rights to config templates.
https://*****************/admin/settings.php?section=atto_templates4u_settings shows only the header "Templates4U" but there are no fields to enter template code.
Which right do I have to add in the mdminrole, so that it is possible to config the plugin?
moodle 3.8.3+

@andreasschenkel
Copy link
Contributor Author

ah ... just found the "problem"
in settings.php there is the condition:
if (is_siteadmin()) {
...
So It would be nessecary to add different condition like has capability site:config ....

@andreasschenkel
Copy link
Contributor Author

I think
if (is_siteadmin()) {
should be changed to
if ($hassiteconfig) {

@andreasschenkel andreasschenkel changed the title small adminrole can not config templates settings.php needs $assiteconfig instead of is_siteadmin() May 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant