Jump to content

Using a script to open files and limit access


Triskal

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

Recommended Posts

  • Newbies

Okay, here's what I want to do:

I have a FMP Server running a TON of databases, some are related, most are not.

I want to create a login database (edulogin) with two fields: login and password.

Then, a second database (edupermissions) with fields: login, database, and permission.

edupermissions will relate to edulogin using the field "login". Therefore, for each database that a user has access to, there will be a record in the edupermissions database, including a level of security located in the "permission" field. (everybody got this so far?)

Basically, edulogin will be related to edupermissions with a "one to many" relationship, using "login" as the relationship field.

SO, a user opens edulogin, it brings them to a screen that forces them to enter a login and password. A successful login will bring them to a screen with a portal displaying all the related records in the database edupermissions showing them which databases they have access to, and a button for each to open that database. With a press of the button, the system will then open that database with the password listed in the "permission" field.

With that in mind, this is what I'm having problems with:

How do I script it so that FMP will open a file from the current server and the file will be named in the field "database".

Kinda like:

Open [Open hidden, "<<database>>"]

The other thing I can't seem to figure out is how to specify the password to give to that file when it is opened (transparently to the user) by pulling it from the field "permission".

I would like to avoid having to add an If/Then statement in a script every time I add a new database to the server. However, if that's what I have to do, that's what I have to do. As far as the password thing, I'm completely at a loss.

If I have been unclear on anything, please post and I'll do the best I can at explaining the situation.

Thank you in advance!

Link to comment
Share on other sites

This topic is 8241 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.