letsencrypt-plesk
letsencrypt-plesk copied to clipboard
Hide Let's Encrypt Icon for non admin users
As non-admin users get a Permission Denied error when clicking on the Let's Encrypt icons in Websites & Domains, why do they get to see it at all? Why not just hide the icon for all except admin users?
Seems the correct steps are:
- Go to Users and create user with granted permission "Create and manage sites"
- Login as created user
- Click "Let's Encrypt" in domain area
Actual result: Permission denied
Expected result: Allow user to manage Let's Encrypt certificate for this domain or hide the button in domain area
@devanes Do I correctly reproduced the bug?
@vlikhtanskiy Apart from the fact that in my case the user already existed, this is correct.
The same applies to subdomains as well.
Ive managed to remove Lets Encrypt button from customer interfaces by renaming the files in: /opt/psa/admin/plib/modules/letsencrypt/hooks
Good luck!
For our linux servers it was /usr/local/psa/admin/plib/modules/letsencrypt/hooks/CustomButtons.php that needed to be renamed. Customer's Let's Encrypt settings can than still be reached by visiting https://<CP_URL>:8443/modules/letsencrypt/index.php/index/install/return/domain?dom_id=<DOM_ID>&site_id=<SITE_ID> (substitute the <CP_URL>, <DOM_ID> and <SITE_ID> for real values, naturally)
Thanks for the tip for hiding the custom button. Does it reappear on upgrade?
Another tip: you don't need to visit the URL manually, you can just visit Let's Encrypt under Extensions and choose the relevant domain from there.