Gossamer Forum
Home : Products : DBMan : Customization :

Add capability somehow mangled.

Quote Reply
Add capability somehow mangled.
I'm befuddled. It seems no matter how I set permissions, the ability to add records is lost. The permissions shown at the main menu list both "view" and "add," as it should be, but the footer link to 'add' is inactive. If I go directly to the add form ("...db.cgi?add_form=1) the form comes up with no
'submit" button -- only "reset."

Authorization Options:

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

I can't really see where the $per_add is set, either. In any case, "add" prints in the footer, but is not a link.

Any insight would be appreciated.
-Brian
Quote Reply
Re: Add capability somehow mangled. In reply to
With the permissions you have set, no one will be able to modify or delete records, even you. Just letting you know.

What changes have you made to the script?

Is it possible for you to let me see your default.cfg file and your html.pl file? You'll need to copy the files into a web-accessible directory -- one where you would place html files -- and rename them to default_cfg.txt and html_pl.txt. Then come back here and let me know where I can take a look at them.


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





Quote Reply
Re: Add capability somehow mangled. In reply to
Hmmm. Perhaps I *don't* understand the permissions.
the cfg and html files are at

cellar8.com/seminar/html.txt

and

cellar8.com/seminar/cfg.txt
Quote Reply
Re: Add capability somehow mangled. In reply to
Let's start with the permissions.

What is it that you want to do? Who do you want to add records? Who do you want to view records? Who do you want to modify and delete records?

There are definite problems with your .cfg file, but I'm not sure about how to tell you to fix them until I know what you want to do.

I accessed your database and had no trouble with the "Add" link. I also got both the buttons on the form just fine. The only thing I can think of is that there might have been a glitch somewhere with the server or with your browser.


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





Quote Reply
Re: Add capability somehow mangled. In reply to
That's odd about the add. I just tried with another browser (IE) and I got the same problem. This happens repeatedly. Next, I'll try a different machine.

What I want for functionality, ultimately, is that anyone can add a record and then view own only and modify own record. The admin person will be able to log on with full permissions. I understand I have view enabled in default permissions at the moment -- it's just I've been experimenting wildly with the config.
-Brian
Quote Reply
Re: Add capability somehow mangled. In reply to
I just tried it via a Windows machine with the IE browser. The add links do show up now, but adding produces an error re the the Reg_ID field, which is the $db_key: though the record number is inserted automatically and seems to be right, upon hitting "add record" an error message results, claiming the field limit is exceeded.(And shows the text 'default' in the Reg_ID field.) The field limit is '5' and the Reg_ID in this case was 2.

-Brian
Quote Reply
Re: Add capability somehow mangled. In reply to
Bonk!
A thousand embarassed pardons! ADD was being blocked by my blocking software. I flagellate myself with spruce boughs!!!
-Brian
Quote Reply
Re: Add capability somehow mangled. In reply to
Ok, now I can do the adds and I have my $db_key field set to '0' so it looks good.I think I'm set for the moment, though I would love to hear how my auth prefs should be set up. Thanks for the responses.
-Brian
Quote Reply
Re: Add capability somehow mangled. In reply to
No problem about the "add" snafu. Happens all the time. Smile

Quote:
What I want for functionality, ultimately, is that anyone can add a record and then view own only and modify own record.

In order for a user to be able to view and modify his own record, he must first log in. That's the only way for the script to associate a record with a specific user. So you won't be able to have $auth_allow_default = 1.

Here's what I would suggest:

Reg_ID => [0, 'alpha', 3, 12, '', '',

$db_key = 'Reg_ID';
$db_key_track = 0;

$auth_no_authentication = 0;
$auth_allow_default = 0;
$auth_signup = 1;
@auth_signup_permissions = (1,1,1,1,0);
$auth_modify_own = 1;
$auth_view_own = 1;
$auth_user_field = 0;

This will give each user one record which only he will be able to view or modify.

One very important thing is that you cannot have the userid field be a counter field. With your current setup --

Reg_ID => [0, 'numer',
$db_key = 'Reg_ID';
$db_key_track = 1;
$auth_user_field = 0;

you are going to have major problems.



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





Quote Reply
Re: Add capability somehow mangled. In reply to
Ok, that seems to work. The only reason I had the userid field the same as a counter field was to (try to) prevent a single user from adding more than one record.
Many thanks.
-Brian