Patch : force users to add subdomains to their existing main domains only
Posted: Sat Feb 13, 2016 5:14 pm
VestaCP is great panel
i started using it from short time only.
i faced a small problem in VestaCP:
- normal Users can Add their own "web-domains" ,and Admin can not stop that .
- and they can add subdomains from Main-Domains that belong to OTHER users .
it's nice , but not suetable for all hosting cases .
So i made a small Patch:
thats when Users want to add a new web domain , the panel will force them to append one of their maindomains to the new domain , so it will be subdomain like this : newdomain.maindomain.ltd
so every new domain the user want to add , will be turned to subdomain from one of his existing domains chosen by him (and only from his existing domains) .
Users :
- can't add new web domain.
- can't add subdomain to other user main domain .
- can add subdomains to the one of their existing maindomain only .
- can chose from their main-domains list when adding subdomain .
- removing Aliases for Users .
- change "add web domain" button to "add sub domain".
Admins :
- no changes
- can add web domains to users , without any problems .
IMPORTANT
to try this you must log out from admin account and log in as normal user , if you log from admin account you will not see any change,even if login from Admin->as user , because we need Admin control still the same (so he can add new domains to Users) .
Patch include the old files Backups But it's better to take your own Backups before use, and try on your own responsibility .
tested on Vesta 0.9.8-15 .
* Maybe VestaCp team can try to find complete solution better than this quick & simple small attempt .
Screenshot:
files :
https://bugs.vestacp.com/attachments/do ... omains.zip
regards
i started using it from short time only.
i faced a small problem in VestaCP:
- normal Users can Add their own "web-domains" ,and Admin can not stop that .
- and they can add subdomains from Main-Domains that belong to OTHER users .
it's nice , but not suetable for all hosting cases .
So i made a small Patch:
thats when Users want to add a new web domain , the panel will force them to append one of their maindomains to the new domain , so it will be subdomain like this : newdomain.maindomain.ltd
so every new domain the user want to add , will be turned to subdomain from one of his existing domains chosen by him (and only from his existing domains) .
Users :
- can't add new web domain.
- can't add subdomain to other user main domain .
- can add subdomains to the one of their existing maindomain only .
- can chose from their main-domains list when adding subdomain .
- removing Aliases for Users .
- change "add web domain" button to "add sub domain".
Admins :
- no changes
- can add web domains to users , without any problems .
IMPORTANT
to try this you must log out from admin account and log in as normal user , if you log from admin account you will not see any change,even if login from Admin->as user , because we need Admin control still the same (so he can add new domains to Users) .
Patch include the old files Backups But it's better to take your own Backups before use, and try on your own responsibility .
tested on Vesta 0.9.8-15 .
* Maybe VestaCp team can try to find complete solution better than this quick & simple small attempt .
Screenshot:
files :
https://bugs.vestacp.com/attachments/do ... omains.zip
regards