Multi Logon

General discussions about WebYep
Post Reply
Bart
Posts: 4
Joined: Wed Dec 22, 2010 9:36 am

Multi Logon

Post by Bart » Wed Dec 22, 2010 9:51 am

Hi,

Can anyone help me with this? I'm making a website and I want to have the possibility to work with 2 different logons.

All the pages in the website: http:/:www.website.com/ will have to be edited in WebYep with the username 'a' en the password '1' except for page 'b' (located in a submap: http:/:www.website.com/folder/page_ok.php
This page should be editable by: user 'b' with password '2'.

If it's possible user '2' can have acces to all the other pages as wel, but this isn't necessary.

Here you find (a detail) of the config-inc.php I've changed:

$webyep_sAdminName = "a";
$webyep_sAdminPassword = "1";

$ Webyep_aMultiLoginName [] = "b";
$ Webyep_aMultiLoginPassword [] = "2";
$ Webyep_aMultiLoginURLPatterns [] = " /folder/page_ok.php";



It doesn't seems to work the way I did it.

any help will be appreciated!

Bart

marcus
Objective Development
Objective Development
Posts: 170
Joined: Tue Nov 30, 2010 1:25 pm

Re: Multi Logon

Post by marcus » Wed Dec 22, 2010 1:02 pm

Bart wrote:
$webyep_sAdminName = "a";
$webyep_sAdminPassword = "1";

$ Webyep_aMultiLoginName [] = "b";
$ Webyep_aMultiLoginPassword [] = "2";
$ Webyep_aMultiLoginURLPatterns [] = " /folder/page_ok.php";
You"re right, this wont work, because you misspelled the configuration options and inserted some blanks, where they don't belong.

A correct setup would be like this:

Code: Select all

$webyep_sAdminName = "a";
$webyep_sAdminPassword = "1";

$webyep_aMultiLoginName[] = "b";
$webyep_aMultiLoginPassword[] = "2";
$webyep_aMultiLoginURLPatterns[] = "/folder/page_ok.php";

Note, that the admin user 'a' has access to the whole site, including /folder/page-ok.php. User 'b' will only be able to edit /folder/page-ok.php and nothing else.

Bart
Posts: 4
Joined: Wed Dec 22, 2010 9:36 am

Re: Multi Logon

Post by Bart » Wed Dec 22, 2010 1:34 pm

Hi Marcus,

Thank you. I think I understand it now. So if the adminstrator 'a' want a to control all pages, en 'b' needs only acces to page_ok.php (in the map 'folder') and there is an other person that wants to have acces to page2.php (in a subfolder named 'folder) and also to the page ' /someOtherPage.php' this would be the code:

Code: Select all

$webyep_sAdminName = "a";
$webyep_sAdminPassword = "1";

$webyep_aMultiLoginName[] = "b";
$webyep_aMultiLoginPassword[] = "2";
$webyep_aMultiLoginURLPatterns[] = "/folder/page_ok.php";

$webyep_aMultiLoginName[] = "c";
$webyep_aMultiLoginPassword[] = "3";
$webyep_aMultiLoginURLPatterns[] = "/folder/page_2.php /someOtherPage.php";


Does there has to be a space before ' /someOtherPage.php'

Best regards,
Bart

marcus
Objective Development
Objective Development
Posts: 170
Joined: Tue Nov 30, 2010 1:25 pm

Re: Multi Logon

Post by marcus » Wed Dec 22, 2010 2:42 pm

Bart wrote:Does there has to be a space before ' /someOtherPage.php'

Yep, this is correct. Spaces are not allowed in URLs, so we use them as a separator between different paths in $webyep_aMultiLoginURLPatterns (not before, or after, but only between paths).
For more examples on configuring multiple logins take a look at the Documentation.

Post Reply