Jump to content

password script


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

Recommended Posts

  • Newbies

Is there a script that when user name and password are entered correctly within database "A", it will then open database "B" that corresponds with the individual who has been assigned to that database.

Database "A", would be used to authenticate access - It would contain 3 fields username/password/and database

Any help would be appreciated!

Link to comment
Share on other sites

Chuck's suggestion will require making a hard-coded script for each user, and it will break every time they change their passowrd. Lots of maintenance!

Instead change to find mode and present them with a layout that has a field for userid and password. They click the find button and if one record is found the script opens the other database otherwise it won't. Much easier to maintain, adding users is just a matter of creating new records in db A.

One problem though -- though it's a nice looking passord system, the data security it offers isn't worth squat. Why? Because for the password system to work the databases will need to be opened with a generic default password that allows the maximum amount of access to the data. Otherwise, after passing your password system the user be asked for another password, the real FMP access privileges password for the database. And if you think that's OK then why not forget about the first password system and use FMP's built-in password security in the first place and save all that development time!

It's like having a fancy keypad on the front door of the house but leaving all the windows open around the side.

Just a minor point: FileMaker Pro access privileges only authenticates passwords, there are no usernames. This is true for database access through the FMP client and through a web browser (despite the fact that the web browser authentication asks for a userid, it is ignored by FMP -- it can be left blank).

Passwords themselves cannot be worked with directly in FMP, but the group that thery are associated with can through the Status[CurrentGroup] function. There is also a Status[CurrentUserName] function but it's of little use because it isn't authenticated.

I'd stick with FMP built-in password system as it's the only secure method. This means creating a password and group for each user (or each class of user) inside each database.

[This message has been edited by Vaughan (edited December 11, 2000).]

Link to comment
Share on other sites

  • Newbies

Thanks for the info. I posted the message, because no one had replied to my previous posting.

What I am trying to do is create a website, that will authenticate user access to their database via the web. The site would have a number of users and databases, therefore I would need to make sure that he/she is accessing the correct file, without seeing other databases and users.

Link to comment
Share on other sites

  • Newbies

Thanks for your help, the script works well. I am now trying to create more users and databases and I am having a problem.

My script reads like this:

If [username="test"]

Perform Script

[sub-scripts,External: "datetest.fp5"]

Note: when user matches test it opens DB, but does not take me to the datetest.fp5

Else

End If

If [username="den"]

Perform Script[subscripts,External: "test.fp5"]

Note: This works, it opens test.fp5 and brings me to database

Else

If [username="king"]

Perform Script [sub-scripts, External: "Tour.fp5"]

Note: same as above works well

I think my problem is in the else, or end if, but I cannot seem to figure it out.

Any suggestions would be appreciated.

Thanks again, you're the best!

Link to comment
Share on other sites

  • 2 weeks later...

I think you need an End If statement for each conditional. The Else step for that test also goes inside the IF step (before the End If).

Try this:

If [username="test"]

Perform Script

[sub-scripts,External: "datetest.fp5"]

Else

If [username="den"]

Perform Script[subscripts,External: "test.fp5"]

Else

If [username="king"]

Perform Script [sub-scripts, External: "Tour.fp5"]

End If

End If

End If

Kind of makes you wish for a "Switch" script step, huh?!

[This message has been edited by aricm (edited December 21, 2000).]

Link to comment
Share on other sites

Filemaker will take you to the database that last performed a script step, simply add a Exit Script, Halt Script, Or Pause/Resume (1 sec) script at the end of the last database that you want open. If you want one to open, then run more steps in the originally, then just have a script in whichever the DB you want to be open that says Pause/Resume and call it from the original.

hope i'm understanding your question

Jeremy

Link to comment
Share on other sites

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