Gossamer Forum
Home : Products : DBMan : Installation :

Shows admin whatever the privilages

Quote Reply
Shows admin whatever the privilages
Just been setting up my script with deni excellent cgi tool. Only problem is there is a link to the admin section on every page (ie even when you login is as guest). As there are no privilages it just gives an authentication error when clicked on. I checked in the html files and this is here for html_home:

print " Admin " if ($per_admin);

so no idea why it is happening. Is there any fruther bits of my config file or the html file i need to include here to make it easier for you.

Quote Reply
Re: Shows admin whatever the privilages In reply to
It does seem that when loggin in with default it does not show the admin thing, it is only when logging in with guest/guest or author/author.

you can see an example at:

http://www.seaschoolsolutions.com/

Quote Reply
Re: Shows admin whatever the privilages In reply to
The codes in the sub html_footer subroutine in the html.pl file should look like the following:

Code:

print qq!| <A HREF="$db_script_link_url&admin_display=1">Admin Menu</A>
! if ($per_admin);


Hope this helps.

Regards,

Eliot

Quote Reply
Re: Shows admin whatever the privilages In reply to
Unfortunatly not, that is what it says already. Weird.. it seems that the script thinks the user is admin when generating that but not when doing privilages. You can see the difference between logging in as default and as guest. weird.

Quote Reply
Re: Shows admin whatever the privilages In reply to
Welp...then you need to check the User Permissions in the default.cfg file.

Regards,

Eliot Lee

Quote Reply
Re: Shows admin whatever the privilages In reply to
# Authorization Options
# --------------------------------------------------------
# No Authentication? (1 = "there is no authentication", 0 = "there is authentication")
# If you choose no authentication, then set the permissions of what
# people can do with: @auth_default_permissions below.
$auth_no_authentication = 0;

# The amount of time in seconds that user files are kept in the
# auth directory before the program removes them. 2-6 hours is
# probably a good value.
$auth_time = 21600; # 6 hours (in seconds)

# Enable (1) or disable (0) logging.
$auth_logging = 1;

# Allow a default user? This means you can specify a user via the URL
# and skip the logon process. Use this to allow people to search without
# logging on, but require log in if they want to add/modify/remove etc.
# (1 = "yes", 0 = "no")
$auth_allow_default = 1;

# Default permissions used if there is no authentication, or for a default
# user. (View, Add, Delete, Modify, Admin), 1 = enable, 0 = disable.
@auth_default_permissions = (1,0,0,0,0);

# Allow people to sign up for their own userid/passwords? They will
# recieve default permissions.
$auth_signup = 0;

# Permissions a new signup should get.
@auth_signup_permissions = (1,0,1,1,0);
# Registered users: can modify/delete _only_ own records. For this to make
# sense you should set default off or to 1,0,0,0.
$auth_modify_own = 1;

# Registered users: can view _only_ own records. For this to make sense
# you should turn off default permissions.
$auth_view_own = 0;

# Auth user field. This is the field position in the database used for storing
# the userid who owns the record. Set to -1 if not used.
$auth_user_field = 13;

# URL to send user if they chose log off. Leave blank and the script will return to
# the logon prompt (although this only makes sense if you are using authentication).
# $auth_logoff = "http://www.gossamer-threads.com/scripts/dbman/";