Remove "Edit Web Content" option from UI if user has not access to File Manager

I see a new "Edit Web Content" option which opens File Manager provided user has proper access rights. For users with minimal access plans the option is still there, but when clicked it shows:

Following errors occured while performing operation
Error opening directory /home/username/home/username/public_html No such file or directory

So please make this new option to respect permissions and if a Webmin user doesn't have access to File Manager, then not to show the "Edit Web Content" option at all.

Status: 
Active

Comments

Actually, that module should already be hidden if the user doesn't have access to it.

In your error, it seems like the problem is that the wrong path is being accessed - not that the module is unavailable. Are you using Virtualmin's chroot feature there?

Where the access for the module is configured? I couldn't find a separate access options for this one.

No, we do not use chroot and I also noticed the path with repeated pattern.

Access to modules like this is set at System Settings -> Server Templates -> Default settings -> Administrator's webmin modules.

I see the bug that causes that file manager error - I will fix it in the next release of Virtualmin.

Access to modules like this is set at System Settings -> Server Templates -> Default settings -> Administrator's webmin modules.

Well, in our case different hosting plan owners have access to the same templates, so it doesn't make sense to limit access to File Manager on a template level. The main problem here is that owners of the most basic hosting plan see that link, which they can not use anyway.

Unfortunately, the virtualmin model mostly uses plans to limit the resources a user can consume (domains, mailboxes, etc), and templates to control what features are visible.