Gossamer Forum
Home : Products : DBMan : Customization :

User settings and search engine problems

Quote Reply
User settings and search engine problems
I want to use three kinds of users :

default : view and search
owner : modify only
admin : everything

$auth_no_authentication = 0;
$auth_logging = 1;
$auth_allow_default = 1;
@auth_default_permissions = (1,0,0,0,0);
$auth_signup = 1;
$auth_modify_own = 1;
$auth_user_field = 0;

I've used the configurator to create a cfg file but somethings won't work :
- if an 'owner' wants to modify his/her data I want to skip the search engine
- if an 'admin' adds an 'owner' I want to change the UserID from 'admin' to owner' right away.
- if I log in as 'guest' the search engine and view won't work.
UserId : position 0
$db_key = 'Naam' # Name
$db_key_track = 0;

If you want to try, go to :

http://unox.student.tue.nl/~hans/cgi-bin/dbman/db.cgi?db=club

Glide
Quote Reply
Re: User settings and search engine problems In reply to
 
Code:
($auth_user_field >= 0) and ($in{$db_cols[$auth_user_field]} = $db_userid);

Change the above to

Code:
unless ($per_admin) {
($auth_user_field >= 0) and ($in{$db_cols[$auth_user_field]} = $db_userid);
}

------------------
JPD





Quote Reply
Re: User settings and search engine problems In reply to
Hi Glide,

maybe this link gives an answer for your questions?


bek
Quote Reply
Re: User settings and search engine problems In reply to
Hi Glide,

maybe this link gives an answer for your questions?

http://www.gossamer-threads.com/scripts/forum/resources/Forum12/HTML/000610.html
bek
Quote Reply
Re: User settings and search engine problems In reply to
hoppla :-)
bek
Quote Reply
Re: User settings and search engine problems In reply to
 
Quote:
- if an 'owner' wants to modify his/her data I want to skip the search engine

Try adding the modification at http://www.jpdeni.com/.../Mods/autosearch.txt .

Quote:
- if an 'admin' adds an 'owner' I want to change the UserID from 'admin' to owner' right away.

That shouldn't be a problem. What problem are you having?

Quote:
- if I log in as 'guest' the search engine and view won't work.

What setting do you have for $auth_view_own? For what you want, it should be set to 0.

Also, what are your signup permissions?


------------------
JPD





Quote Reply
Re: User settings and search engine problems In reply to
 
Quote:
- if I log in as 'guest' the search engine and view won't work.

if you try my site, login/pwd=guest, list all will work but view won't, this error message is generated :
Document contains no data, Try later or contact server's administrator<P>
Almost everything else works except search ??

Quote:
What setting do you have for $auth_view_own? For what you want, it should be set to 0.
$auth_view_own = 0;

Quote:
Also, what are your signup permissions?

$auth_signup = 1;



Quote:
if ($per_admin) {
print qq|
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="150"><$font_color>UserID:</FONT></TD>
<TD VALIGN="TOP" WIDTH="475"> <INPUT TYPE="TEXT" NAME="UserID" SIZE="5" MAXLENGTH="5"></TD></TR>
|;
}
if (!$per_admin) {
print qq|
<input type="hidden" NAME="UserID" VALUE="$rec{'UserID'}">
|;
}
is part of 'html.pl'. To create a record one must have Admin-privs thus UID=Admin. If I want to create a record with a different UserID (length(max)=5) and submit it, the UserID gets replaced by Admin.number. Can I prevent this from happening ?

<Center>H</Center>




Quote Reply
Re: User settings and search engine problems In reply to
I've reinstalled the entire database :
1 made the demo work, everything's okay, including the search engine
created/deleted several entries, Ok

2 Used Jpdeni's Configurator to create a
customize cfg and html.pl :
2a
Default : View
Registerd: View Own, Modify Own
2b
UserID field : UserID
Key-field : Name
other fields
2c
defiend fields
2d
entered right location of dbman files
rest default
2e
implemented default.cfg and html.pl

3 started testing new dbman

** same problem with search-engine **

Perl version : 5.00404

URL : http://unox.student.tue.nl/~hans/cgi-bin/dbase/db.cgi
default.cfg :
http://unox.student.tue.nl/~hans/default.txt
html.pl :
http://unox.student.tue.nl/~hans/html.txt
/cgi-bin/dbase

Where's the damm bug
Quote Reply
Re: User settings and search engine problems In reply to
I noticed some things about your .cfg file that I'm a little confused about. I'm not sure if it's your mistake or if it's a bug in the configurator.

You have

$auth_view_own = 1;

That means that only the user who added the record can view it. Since you also have

@auth_default_permissions = (1,0,0,0,0);

and

@auth_signup_permissions = (1,0,0,1,0);

That means that only the admin can view records, since no one else is allowed to add them.

The other thing I noticed was that you have

$db_key = 'Naam';

but when I do a "List All," I see &UserID=* in the URL. That means that something is happening to the definition of the $db_key between the time it is defined and the time the link to "List All" is printed out.

Then I did something different. I logged in as "admin" and clicked the "Admin" link. From the links on that page, I clicked "List All." This time, the URL said &Naam=*, but it had the demo database records.

I'm not sure what the problem is. Possibly you are working on the database at the same time I am, so that I'm unable to see what's going on.

It might be best for me to try to check out your database when you aren't working on it at the same time.

------------------
JPD





Quote Reply
Re: User settings and search engine problems In reply to
I've set userright to option 6 of JPDeni's tutorial 4
<Quote>
$auth_no_authentication = 0;
$auth_allow_default = 1;
@auth_default_permissions = (1,0,0,0,0);
$auth_signup = 1;*
@auth_signup_permissions = (1,1,0,1,0);
$auth_modify_own = 1;
$auth_view_own = 0;
$auth_user_field = #;
</Quote>
The one thing I don't like option6 allows users to add more entries and I want to restrict it to 1 (their own).

Stil the (urgent) problem with the search engine ??
<Quote>
$db_key = 'Naam';
$db_key_track = 0; # points to UserID
</Quote>

I won't be working on the script from 13.00 to 18.00 CET.
Quote Reply
Re: User settings and search engine problems In reply to
JPDeni,

the problems with the search engine seem te be a browser problem. With Netscape communicator 4.6 i can't use the search engine (document contains no data) and with micro$oft internet exploder 4 everything works.

My guess is JPDeni's configurator adds some code which won't work with NS4.6 but works with MIE 4.

Hope this helps in finding the solution.


Quote Reply
Re: User settings and search engine problems In reply to
Looks like you got it fixed. I logged on with "admin/admin," "author/author," "guest/guest" and as a default user and the search worked just fine. I was using Netscape.


------------------
JPD