Gossamer Forum
Home : Products : DBMan : Customization :

Different permissions for fields in a record?

Quote Reply
Different permissions for fields in a record?
Hello everyone

I would like to use DBMan as follows...

For each record, certain fields would be filled in by admin and made unalterable by other users, other fields would be alterable by any registered user.

Fields that can be altered by registered users must allow any registered user to alter and append content.

Only registered users will be able to view records.

The admin fields will probably be uploaded as a database file but new records will need to be added (by admin only).

If anyone can indicate if this can be achieved using permissions without mods, or point me to the appropriate mod, I'd me most grateful.

Thanks
--
5230n0155w
Quote Reply
Re: [keithpeter] Different permissions for fields in a record? In reply to
Hmmmm. I thought it might be complex, but maybe not.

It would seem that you would want to set, in the .cfg file --

$auth_no_authentication = 0;
$auth_allow_default = 0;
$auth_signup = 1;
@auth_signup_permissions = (1,0,0,1,0); # allows registered users to view and modify, but not add or delete
$auth_modify_own = 0;
$auth_view_own = 0;
$auth_user_field = -1;

If you are using the auto-generate feature, you'll want to set the form length for the admin-only fields to -2, which would make them hidden fields on the form. If you create your own form, you'd have to make the admin-only fields hidden if the person does not have admin persmission.


JPD
----------------------------------------------------
JPDeni's DBMan-ual
How to ask questions the smart way.
Quote Reply
Re: [JPDeni] Different permissions for fields in a record? In reply to
In Reply To:
Hmmmm. I thought it might be complex, but maybe not.

Thanks JPD for prompt reply.

I'll try this one over the weekend - it is necessary for registered users to _see_ the admin fields but not be able to change them. It is necessary for registered users to be able to change each other's fields....

I'll set up a dummy system over the Weekend. If anyone is wondering, it is a target progress monitoring thing.
--
5230n0155w
Quote Reply
Re: [keithpeter] Different permissions for fields in a record? In reply to
Quote:
it is necessary for registered users to _see_ the admin fields but not be able to change them.


On the record display -- the page that is created when you do a "View Records" thing -- the admin fields will be seen. This is what is created in the html_record subroutine. But when they modify the record, using the html_record_form subroutine, it won't be seen.

You can change that, if you want, though. You could have the contents of the field printed out so they can see what's there, but have the actual form field hidden so they can't change it. You would have to do a little modifying in order to have that happen. If you want me to help you do that, I'd need to know whether you were planning to use the autogenerate feature or you were going to create your own forms and displays. (I suppose I could help you with both, but it's easier just to do one, if I can get away with it. :-) )


JPD
----------------------------------------------------
JPDeni's DBMan-ual
How to ask questions the smart way.