Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7418 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I have a database that I give out to quite a few people and I want to setup accounts that expire every year and switch to read-only status. Does anyone know how to do that? Thanks!

Randall

Posted

Hello Randall,

There are several aspects to what you are wanting to do.

An account derives its capabilities from the privilege set to which it is assigned. In order for an account to 'switch to read-only status', it must either be assigned to a different privilege set, or the privilege set to which it is assigned must be modified.

In order to automate this process, I suggest that you pre-configure a read-only privilege set, then create a switching script which:

1. Performs a re-login to a default 'housekeeping' account,

2. Deletes the user's account, and

3. Creates a new account for the user which is assigned to the read-only privilege set.

4. Performs a re-login to a the newly created read-only user account,

In order to effectively automate the process, you will need to supply the user's password within the Add Account[ ] script step. In order to do this, you will either have to capture the user's password at the time (eg via a custom dialog) or encrypt and store it in advance so that it can be decrypted and used to create the new account.

In order to have this process occur at the appropriate time (eg after twelve months has elapsed) you will also need to store a date that indicates when the user's write access to the data should expire. In order that this be secure (not able to be over-written by unscrupulous users and/or cracker programs) you should consider encoding this with a checksum and encrypting the resulting string before storing it in the database. For security, various processes - including the start-up script - should decode this data, verify its validity against the checksum (to confirm it has not been tampered with) and compare it to the system date to determine if the status change script should yet run.

That's it in a nutshell. To implement such a procedure securely, you will need to choose a method of encryption. We publish one that is v7 compatible, but there are various others available (I can't verify their compatibility with v7, though - you'd have to check for yourself). Then you'll have a bit of scripting in front of you.

Posted

Ray has outlined the best way to do this.

I've used a wimpy way for small, very simple sollutions - and not those that are mass produced for retail sale of 1000s of copies.

I have some solutions in which the print layouts woudl suffice as a complete review of the record (e.g. invoices, reports ,etc.). Then I use a start up script that checks the date and once it hits a certain threshold, it directsthe user to a separate layout with limited scripts that only display/print the print layouts in preview mode.

Of course the users accounts have to be very restrictive, otherwise of it's simple to get around.

Posted

Wow, thanks everyone! I've used both methods and it's worked out really well. Hopefully you won't think me too bold if I ask another question. I have 1 table that has 4 different layouts. One of the layouts is one large field for notes and such. Two others are for pictures that I can import. I was hoping to come up with a way to print a report of each entry but I end up with the first layout, which has 90% of the information, and frequently the other three layouts aren't even used so I get 3 blanks. Is there any way to make it skip these layouts if there's nothing there? When finished, my script should go through each record and print only those layouts that carry information. I made one script that uses an "if empty" to skip it but the problem is, I send a command to print 4 times for every record and, when you have 200+ records, that gets a bit tiresome dealing with the print screen. I'd define the print values and do it without dialog, but the next user may have a different printer than me. Any suggestions?

This topic is 7418 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.