Gossamer Forum
Home : Products : DBMan : Customization :

Admin Problem

Quote Reply
Admin Problem
I am in the process of setting up a database that ultimately I will have nothing to do with - Basically I want users to be able to ONLY view records and nothing else (this is already set up and working) with the ability for ONE admin user to alter the db through the dbman interface - If this means having to type in a massive string in the location bar within a browser that would not matter as the ONE user could easily copy & paste this info into IE or NS . . . Can this be done without altering the screen look ? In other words being able to admin without actually having the admin option on the screen . . . I apologise in advance if this has been covered before or is featured within the site somewhere - I have looked around for quite a while for this info - Thanks

[This message has been edited by Snookey (edited April 21, 2000).]
Quote Reply
Re: Admin Problem In reply to
The "Admin" link (or any other links, for that matter) only appear on the page when the user has permission to use the link. So the administrator can have the links to use, while the users will only see the "View" options.

Is this what you wanted to know?


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






Quote Reply
Re: Admin Problem In reply to
Please forgive me if I'm losing the plot somewhere, but what I mean is this. Users log on a default user with permissions only to view records . . which is working ok. Now, can I create a back door for someone to log as admin through the address/location bar ?? to still have admin rights and edit delete, generally amend the dbman from it's interface - like I said - It's for someone who can't do the LITTLE I can, but will need to alter the db at some point, hopefuly from the dbman interface.
Quote Reply
Re: Admin Problem In reply to
Snookey,

I think I understand what you're looking for here, and it is pretty simple to do.

First, decide if your "view only" users are going to all have their own accounts, or if they're going to use the "default" settings ("default" isn't a user perse', but a DBMan setting in the default.cfg file.)

Next, create an account for the person(s) that is going to have the administrative (read/write/modify/delete) functions; if you have the original settings of DBMan still, you would do this by logging in as username "admin"/password "admin", going into Admin, and adding a new user with all the permissions you want them to have.

Finally is the matter of accessing the site using different account types. I have a HTML web page that everyone can search from (view only). You can give people access to view your database a couple different ways:

1) external search page: Assuming you're using the "default" access settings, create an HTML page outside of DBMan, with whatever search fields you would like. For largely text databases, providing just a keyword and/or a boolean search field (requires the boolean mod in the Resource Center) should be enough. Your HTML page would look something like this:

Code:
<HTML>
<HEAD>
<TITLE>Search the Database</TITLE>
</HEAD>
<BODY>
Please enter your search criteria, and press ENTER:<BR>
</-- Start KEYWORD search form -->
<FORM ACTION="/http://path/to/db.cgi" METHOD="GET">
<INPUT TYPE="hidden" NAME="uid" VALUE="default">
<INPUT TYPE="hidden" NAME="db" VALUE="default">
Keyword (exact phrase): <INPUT TYPE="text" NAME="keyword">
<INPUT TYPE="hidden" NAME="view_records" value="1">
</FORM>
<BR>
</-- Start BOOLEAN search form -->
</-- Leave the following form out if you're not using the boolean MOD -->
<FORM ACTION="/http://path/to/db.cgi" METHOD="GET">
<INPUT TYPE="hidden" NAME="uid" VALUE="default">
<INPUT TYPE="hidden" NAME="db" VALUE="default">
<INPUT TYPE="hidden" NAME="bool" VALUE="and">
Boolean (multiple words): <INPUT TYPE="text" NAME="keyword">
<INPUT TYPE="hidden" NAME="view_records" value="1">
</FORM>
</BODY>
</HTML>

2) internal search page: again if you are using the "default" access settings, you can provide a link directly to dbman's internal search form:

Code:
<A HREF="http://path/to/db.cgi?uid=default&db=default&view_search=1">Search the Database</A>

Your administrator will probably need all the menu options right at their fingertips. For them, give them a link directly to the dbman script with their username and password, like this:

Code:
<A HREF="http://path/to/db.cgi?db=default&uid=their username&pw=their password&login=1">Admin Login</A>

* For security purposes, you might want to consider putting the admin login into a bookmark/favorites link instead of an A HREF link in a web page in order to keep everyone else but the right person/people out of your database.

Lastly, if you decide to give everyone a seperate account to view the database with, the easiest thing to do is either make them all bookmark/favorites like the one above, or simply provide a link to the login page:

Code:
<A HREF="http://path/to/db.cgi">Access the Database</A>

* If you use both of the cookie mods in the Resource Center, your users won't have to enter their username and password on the login screen (it will remember their login and password for them), and they won't have to log into the database more than once per session (it will remember their login session until they close their browser).

I hope this helps you! Smile

--Lee

[This message has been edited by leisurelee (edited April 22, 2000).]
Quote Reply
Re: Admin Problem In reply to
Lee - Thanks a lot . . . I haven't had time to try your suggestion but I'm sure it's what I want . . .Thanks again, I'll post again when I've got it working !!
Quote Reply
Re: Admin Problem In reply to
Lee - Yes , you've sorted my problem ... Thanks for identifying my 'simple mind' I now understand why most were not interested .. Cheers Paul
Quote Reply
Re: Admin Problem In reply to
*giggle* Well, it was a simple matter of regurgitation on my part. This is exactly what I've done for my database at work. I maintain the code. One person maintains the data into the database. Over 40 people access the database. It took a month or so to figure out the easiest way to make it all work.

And I doubt it was a matter of being simple-minded, or anyone not being interested in your problem. Many people use the forum for specific purposes, and put most of their efforts into making sure their own systems are working best for them. There's only a handfull of people that have the luxury of being able to take the time to answer some of the questions posted in the forum. Smile

Toodles!!

--Lee
Quote Reply
Re: Admin Problem In reply to
Lee, Thanks again and just to clarify, my comments about people not being interested were aimed as a criticism of myself and not the forum - Anyone's time they spend helping is grately appreciated and maybe sometimes(after you've solved a problem) you think 'well I should really have been able to sort that out myself' That's all - Cheers

[This message has been edited by Snookey (edited April 23, 2000).]
Quote Reply
Re: Admin Problem In reply to
Just a small 'add on' problem to this - I'm using JPD's long/short display Mod and when in admin Modify/Add/View etc etc always come up in the short display ... What do I need to amend to take the links to the long display for modification - I've tried messing arond with $db_script_link_url and $long_url etc, but I can't see it(as always!!)
Quote Reply
Re: Admin Problem In reply to
The way the short/long display is set up, you should get the short display when there is more than one result from a search and the long display when there is only one. Is this not happening for you? Or do you want the long display all the time?


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






Quote Reply
Re: Admin Problem In reply to
I've got three fields in the short display and 10 in the long - If an admin user hits the "add" link it goes to "add" in the short display, so obviously only three fields can be added - When clicking "modify" you can end up at a screen with the long display but it is un-editable and takes you back to the short display for editing - sorry to be a pain, but I've tried all sorts - At least I feel like I'm learning a lot from examining the script though !!
Quote Reply
Re: Admin Problem In reply to
The short/long display should not have anything to do with the forms. It only deals with html_record, not html_record_form.

I may need to take a look at your html.pl file. Please save it to a web-accessible directory (one where you would place .html files) and rename it to html_pl.txt. Then come back and let me know where I can pick it up.


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