Gossamer Forum
Home : Products : DBMan : Customization :

Give users a limit to add records

Quote Reply
Give users a limit to add records
How do you give (Default)users of DBMan a limit of adding for example say 5 records??
Quote Reply
Re: Give users a limit to add records In reply to
The only way you can know how many records a user has entered is if the user is a registered user. It would be impossible to track the number of records entered by a given default user.


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





Quote Reply
Re: Give users a limit to add records In reply to
Is there nothing to do with a users Email adress??
Quote Reply
Re: Give users a limit to add records In reply to
If there is an identifying field, then I suppose there is a way. (I hadn't realized you were talking about having a field that identified the default user.)

Not without a whole lot of work, still. You would have to duplicate some of the query subroutine in the validate_record subroutine, to look just for that field. Also, it still would not prevent them from filling out the "add record" form, but would tell them later that they weren't allowed to add.

This would be some extensive custom work.


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





Quote Reply
Re: Give users a limit to add records In reply to
I think of this:
When a new user make an account, dbman save the username, password, authentfication, emailadres, but can there also be save a number, what give the maximum adding records, let's say 5? When a user log in, the username and pw is checked, also the authentifications are set and ther is a variable loaded for the adding part. When this user adds a record, that number has to count back and save in the *.pass file. When this is 0 the user does know immidiatly that he cannot add any records.
When I hit my purpose, please give me the technical part??, or tell me, why doesn't this work??

Thanks.
Mart.
Quote Reply
Re: Give users a limit to add records In reply to
I suppose that would work. You'd need to make sure you accounted for that extra variable everywhere the password file is accessed.

You could also set it up so that if the counter reached 0, the person's "add" permission was set to 0.

However, you would not be able to do this for a default user, as you first said you wanted to do.

In order to accomplish this, you'll need to read the script closely to see what procedures it goes through. I would suggest getting a book about Perl -- _Learning Perl_ is very good and _Perl 5 for Dummies_ is also a good resource. These will help you to understand the commands that are in the script.

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