Allow to edit the PHP version only

Since a recent upgrade (commit), the "PHP Version" menu in the virtual-server does not exist anymore, instead it has been moved to "PHP Options" (better UX).

However, this last does not show when you have only the "Can select PHP version" permission (edit_phpver), it show only when you have the "Can edit website options" (edit_phpmod) permission (see in virtual-server-lib-funcs.pl)

So the users with edit_phpver permission cannot edit the PHP version, unless they have edit_phpmod permission too.

In our case we don't want to allow them to edit the PHP mode, but we like to let them choose their PHP version, which is so impossible.

In think the edit_phpmode.cgi page should be allowed in both case, if the user has edit_phpver permission OR edit_phpmod permission. And the options displayed on this page should depends on these 2 permissions.

You can reproduce it easily :

  • Create a virtual-server

  • Go to Administration Options > Edit Owner Limits

  • In the section "Allowed capabilities and features" > "Edit capabilities for virtual servers" : check only "Can select PHP versions"

  • Then login as the virtual-server owner : you don't see "PHP Options" menu nor "PHP Version menu"

if you validate it, I may be able to make a pull request if you have no time :)

Thanks !

Status: 
Fixed (pending)
Virtualmin version: 
1.97
Webmin version: 
6.16

Comments

Title: Allow to edit the PHP verson only ยป Allow to edit the PHP version only

Thanks - we'll fix this in the next release.

Ilia's picture
Submitted by Ilia on Tue, 04/27/2021 - 03:24

@xorax - if you feel like it, you can try this patch, and tell us if it works for you.

This Remains an issue

Current ACLs only allow to edit PHP versions. Honestly understand the move however for the existing customers ACL we do not allow access to the "Can edit website options", just caused issues at times

We Also don't want to allow them to edit the PHP mode, but we do want to let them choose their PHP version

Showing as PHP version before the changes was actually perfect and made sense NOW we have 2 PHP Options 1 under Server Config AND # 2 under webmin modules that allows to php ini changes?

Sorry just did not like moving that for the sake of the UI

Was much more clear and honestly easier prior to the recent change. IMHO

Anthony

BUMPING Fix does not allow to ONLY Change PHP Version

What happens if you grant the user ability to edit the PHP versions but not PHP options, and they click on "PHP Options" ?