Gossamer Forum
Home : Products : DBMan : Discussions :

User Options Dilemma

Quote Reply
User Options Dilemma
Something strange is happening to the user interface for my EZ Books site. (www.ezfindit.com/ezbooks)

When a user logs in (user="test2", pswd="test2") the menu options correctly excludes the "Admin" option. Also when "test2" user clicks "Modify" only his listings correctly show up and he can edit them.

However, when other users (user="test", pswd="test") log in, the "Admin" option show up in the menu. Also, when "test" user clicks "Modify" a search screen shows up. Only after "test" user clicks on the "Main" link do the correct options show up in his menu and only then when clicking on "Modify" test's listings correctly show up and he can edit them.

I have looked at the default.pass file and users test and test2 have the exact user permissions.

What the heck is going on?

I have placed a copy of all config, db, password and Perl files in "www.ezfindit.com/test" directory.

Please help, I'm stuck and I can't figure out what to do.

Thanks.

Quote Reply
Re: User Options Dilemma In reply to
Please unprotect the directory, so we can access the files.

Thank you.

Regards,

Eliot Lee

Quote Reply
Re: User Options Dilemma In reply to
I chmoded the directory 777 but for some reason dir browsing still doesn't work. You can access each file directly by typing the whole name : www.ezfindit.com/test/default.cfg (default.pass, html.pl, db.cgi, default.db).

BTW - on a Linux server with Apache, what command(s) will allow directory browsing.

Quote Reply
Re: User Options Dilemma In reply to
I don't see what is wrong. I mean, I see the problem, but I don't see what could be causing it.

Is this happening with any other username?

Try deleting "test" and then adding it in again. The only thing that I can think of is that there is some corruption on that line. But maybe someone else will have an idea.

JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: User Options Dilemma In reply to
Yep, all the other users in the default.pass file seem to have the same problem. When I originally tested and re-tested my modifications everything worked ok. Try using user=cwork pass=cwork (but don't delete the posts since it's a real user) and you can see it does the same thing.

Also feel free to create another test user account and see what happens. Just call every post test and a number so I can delete them afterwards.

Thank you very much for trying to help. It's driving me crazy trying to figure out what's going on.


Quote Reply
Re: User Options Dilemma In reply to
Since it's happening with every userid (except the last on in the .pass file) the problem has got to be in auth.pl, specifically sub auth_check_password.

Try changing

foreach (0 .. 3) { $permissions[$_] = int($permissions[$_]); }

to

Code:

$view = int($view); $add = int($add);
$del = int($del); $mod = int($mod);
$admin = int($admin);
There is probably some real significance to this not occurring with the last entry in the .pass file. Hmmm. Lemme check something.... Well, that didn't tell me what I thought it might. I was thinking that if I added a new userid, the test2/test2 would have the same problem as the others. It doesn't.

Did all of these people sign up through DBMan or is this an imported file?

JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: User Options Dilemma In reply to
They all signed up using DBMan. As an aside though, when I tried adding the user using the "Admin" option, the permissions came up as: ":1:1:1:1", but when I created the user account through DBMan user signup option it came up as:":1:1:1:1:0".

Does this help? Should I proceed with the auth.pl change you mentioned?

Quote Reply
Re: User Options Dilemma In reply to
I'm not sure what's going on with the admin thing.

Yes, go ahead and make the change in auth.pl. At worst, it will make no difference. At best, it might just fix everything. Smile

JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: User Options Dilemma In reply to
It worked! That did it! You fixed it.

Thank you very, very much!

Quote Reply
Re: User Options Dilemma In reply to
Yay!!!!! Smile

You're welcome. Best of luck on your project.

JPD
http://www.jpdeni.com/dbman/