Page 1 of 1

There is no "proxy support" option when editing a web item

Posted: Wed Mar 08, 2017 12:41 pm
by baijianpeng
Today I login in to VestaCP GUI panel, tried to add a new web. Then after save, I click on the "edit" button, but on this editing interface, there is no option of "proxy support".

Why?

--------------------------- update ------------------------------

Well, I formerly logged in with non-admin user account to VestaCP, so there is no "proxy support" option.

Now, I logged in with "admin" user account of VestaCP, and then I "login as user001" and tried to edit the Web (domain name) of this user, then I can see the "proxy support" option on the editing interface.

Why the "proxy support" option is not visible for non-admin user?

Thank you.

Re: There is no "proxy support" option when editing a web item

Posted: Thu Mar 09, 2017 12:18 pm
by skurudo
By desing,
it is not anticipated that the user can change something substantial by yourself

Re: There is no "proxy support" option when editing a web item

Posted: Thu Mar 09, 2017 12:35 pm
by baijianpeng
But, the problem is: if I edit the web item with non-Admin user account (of course I can NOT see the "proxy support" option there), then, after Save, I saw on the Web list, there shows:
Proxy Support : No
Which I remeber was "Yes" on the list page BEFORE I edit it.

So, the key of my question is: Why the "proxy support" was disabled after save while I NEVER have a chance to disable it on the editing page?

Re: There is no "proxy support" option when editing a web item

Posted: Thu Mar 09, 2017 2:02 pm
by skurudo
The problem is any repeatability? We would like to test on the test server

Re: There is no "proxy support" option when editing a web item

Posted: Thu Mar 09, 2017 11:28 pm
by baijianpeng
Yes, I can confirm that you will reproduce this issue by following steps:

1. login in VestaCP GUI with non-Admin user account;
2. create a new web item (domain), without any extra operation, just save it;
3. Return to the Web Service list, you can see that this new web item has "proxy support: yes" attribute;
4. Click the "Edit" button of this new item, on the editing page, do not change anything, just click "Save" button;
5. Return to the Web Service list, Now you will see the "proxy support" attribute of this web item has been CHANGED to "<strike>proxy support</strike>" without "Yes" !

Since there is no option for "proxy support" on the editing page for a non-Admin user, so there is no chance for this non-Admin user to give a "proxy support: Yes" attribute to this web item again!

Don't you think this is a bug?

Thank you.

Re: There is no "proxy support" option when editing a web item

Posted: Thu Mar 09, 2017 11:34 pm
by baijianpeng
Why I can not make words in post with "strikethrough" format on your forum?

I tried both [s] and <strike> tag but they were rendered as the raw code.

Re: There is no "proxy support" option when editing a web item

Posted: Thu Apr 20, 2017 10:32 am
by svirus
Hello,

I found some other bug related to this bug.
When I use SSL with letsencrypt without proxy then response is 404.
So my firends can't create SSL with GUI, but when I'am logged as admin, and use "login as xxxx", then I can select proxy support, and then I can create SSL with Letsencrypt

Re: There is no "proxy support" option when editing a web item

Posted: Fri Apr 21, 2017 10:18 am
by svirus
I found fast workaround for this problem.
/usr/local/vesta/web/edit/web/index.php:
add before "// Delete proxy support" (~224 line):

Code: Select all

if($_SESSION['user'] == 'admin') {
and also add before "// Change document root for ssl domain" (~268 line):

Code: Select all

 } 

Re: There is no "proxy support" option when editing a web item

Posted: Mon Oct 16, 2017 8:27 am
by quacos
This was driving me crazy. Checkboxes are very dangerous in web development, because when you manage the form you are unable to know if checkbox has been left unchecked or if it was entirely missing!

Re: There is no "proxy support" option when editing a web item

Posted: Mon Dec 11, 2017 6:23 am
by baijianpeng
svirus wrote:I found fast workaround for this problem.
/usr/local/vesta/web/edit/web/index.php:
add before "// Delete proxy support" (~224 line):

Code: Select all

if($_SESSION['user'] == 'admin') {
and also add before "// Change document root for ssl domain" (~268 line):

Code: Select all

 } 
I tried your code today, this code completely hide the "proxy support" option, instead of showing it with checkbox mark.