Search…

X3 Photo Gallery Support Forums

Search…
 
ewok2
Experienced
Topic Author
Posts: 26
Joined: 13 Jul 2010, 12:56

"Protect/user" vs "Users"

06 Mar 2017, 15:21

Hello Karl

Me again :-)

Two things :
1rst (more a remarq) when you change the name of the main directory of the gallery, except the main page, the whole gallery does not work any more.
The only workaround I have found is to reset with the "tools/reset setting" (but you loose every customisation of the gallery you have maid
=> is it normal ?

2nd things is related to users.
I have understand that USERS declared in the database have the possibility to creat a personnal gallery.
But what are the user from the protect menu used to ?
When I declare some user in the protect menu with specific directory, I don't have any request for a user when I navigate in this directory...
Could you explain the useage ?

Thanks
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: "Protect/user" vs "Users"

06 Mar 2017, 23:53

ewok2 wrote:1rst (more a remarq) when you change the name of the main directory of the gallery, except the main page, the whole gallery does not work any more.
The only workaround I have found is to reset with the "tools/reset setting" (but you loose every customisation of the gallery you have maid
=> is it normal ?
What do you mean "main directory"? Also, what do you mean "does not work any more"? Pages don't load or what? If you have X3 uploaded in yourdomain.com/x3/ and then rename the folder to yourdomain.com/gallery/, it works fine (many users do this, and we do it ourselves) ... But after such a change, you will likely need to click SAVE in the panel, to refresh pages. Yes, this is normal because X3 saves processed pages in a cache folder, and these pages (and the menu) need to be recreated when you physically rename a PATH that affects all links in your X3 website.

We might look into a fix for this, so that pages are refreshed if x3 path changes.
ewok2 wrote:I have understand that USERS declared in the database have the possibility to creat a personnal gallery.
That is correct. Panel USERS (available in database-version of panel) are for PANEL access only, an does not have anything to do with password protected pages in the X3 website.
ewok2 wrote:But what are the user from the protect menu used to ?
When I declare some user in the protect menu with specific directory, I don't have any request for a user when I navigate in this directory...
No it doesn't request a specific USER, and that is not the point ... Besides, that would exclude OTHER users having access to the same page. The point of USERS, is that you can create a USER, and assign them access to multiple pages, instead of adding separate username+password combinations for each page you want to protect. You might have one user1 who has access to pageA, pageB and pageC, while user2 has access to pageA and pageB, wile user3 only has access to pageA. If you just set a username+password for a specific page (without having USERS), then you cannot achieve the above obviously, and the login for a page would always be what you set as username+password.

All this is explained in depth from the "protected" help page:
x3-panel wrote:Page Password Protection
Here you can add passwords to your pages. Simply locate the page in the link field, add a username and password, and click save. The specific page will now require login when accessed by any visitor.

Users
* Optional
Instead of adding a username and password per page link, you can instead include users to give specific users access to a page. Users are added separately from the users tab. The benefit of "users", is that you can assign a single login for a user, which may allow them access to multiple protected pages without re-entering login credentials. Also, it is sometimes easier to manage usernames and passwords in a users section for persistent usage.

* You should select either a user OR username+password, not both.

Recursive Protection
Link protection is recursive, which means the login for a specific link will inherit upon child pages. For example, a password applied to galleries/ would also apply for child-pages galleries/food/ and galleries/landscape/. If you are specifically protecting child-pages of already-protected parent-pages, the child-page login will outrank the parent-page login.

Global Protect
Use the special *Global link to protect your entire X3 website. Basically this is like protecting the / root page, and since link-protection is recursive, it will protect ALL pages - your entire website. * You can still apply passwords to child-pages, which will outrank the global protection.

Super Users
There is a special superuser user, which can access ALL password-protected pages without even being assigned specifically for the link. A super-user should normally be reserved for gallery-owners who want to remember a single login that works on all password-protected pages. Create a super-user in the users-section by simply appending an asterisk* behind the username, for example superuser*. Since super-users are allowed access to ALL password-protected pages, they do not show up in the list of available users to assign from the links tab.

* The asterisk* character is part of the username, and needs to be included when logging in.

Sessions
Login uses WWW-Authenticate, which basically creates "sessions" in the browser that remembers the current authentication. This helps so the visitor doesn't need to re-authenticate, and it also allows a "user" to access all pages they are assigned to without having to enter login details more than once. This is a good thing of course, but since there is no "logout" for these sessions, it can make testing difficult from your browser since you may be logged in to a session already. Therefore, if you are testing your protected pages, you may need to use "New Incognito Window" (Google Chrome), or "New Private Window" (Safari, Firefox) for each test. These special windows do not inherit your browser sessions, so you can test properly. Just remember to to open/close the window for each test, because even private windows have temporary sessions until they are closed.
 
ewok2
Experienced
Topic Author
Posts: 26
Joined: 13 Jul 2010, 12:56

Re: "Protect/user" vs "Users"

07 Mar 2017, 15:30

Thanks for reply

For the 1rst point yes I change my directory photo-x3 (which does content the "content" folder) to photo
This photo-x3 was on a data Hdd with a link creat in the /var/www from the server.
when I perform the renaming operation, after emptying the cache of the firefox, I could access to the "Index" page but not more to the other content subfolder page... => "page does not exist" in firefox or something like this.

As explain I solved my problem by reseting the conf from the menu.

I just try to reproduce this problem without success, so may be I had made another change that bloc ?

Thanks for the User clarification
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: "Protect/user" vs "Users"

07 Mar 2017, 22:57

ewok2 wrote:I just try to reproduce this problem without success, so may be I had made another change that bloc ?
Hard to say what it was. You definitely should be able to move X3 directory freely around on server, as long as you "refresh" it by clicking "save" from panel after move.