Patch : force users to add subdomains to their existing main domains only

Section with modification and patches for Vesta
orwah
Posts: 9
Joined: Sat Feb 06, 2016 9:23 pm

Patch : force users to add subdomains to their existing main domains only

Postby orwah » 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:
Image

files :
https://bugs.vestacp.com/attachments/do ... omains.zip


regards

AFN
Posts: 39
Joined: Sat Feb 01, 2014 2:03 am

Re: Patch : force users to add subdomains to their existing main domains only

Postby AFN » Fri Feb 19, 2016 2:47 am

Seems nice, but how to I install it?

mike08
Posts: 156
Joined: Sat Jun 20, 2015 7:12 am
Location: San Salvador, El Salvador

Re: Patch : force users to add subdomains to their existing main domains only

Postby mike08 » Sat Feb 20, 2016 12:47 pm

AFN wrote:Seems nice, but how to I install it?

Copy the files from the vesta/web directory in the .zip file and paste them into:
/usr/local/vesta/web/
Make sure to backup any file that would be overwritten in case you want to go back to your previous state.
Regards,

skamasle
Collaborator
Posts: 360
Joined: Mon Feb 29, 2016 6:36 pm

Re: Patch : force users to add subdomains to their existing main domains only

Postby skamasle » Wed Mar 09, 2016 3:00 pm

Hi

File was deleted ?

I get 404.


Return to “Modification & Patches”



Who is online

Users browsing this forum: No registered users and 4 guests