Jump to content

Override using different user's credentials


Reid

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

Recommended Posts

Hello,

 

I would like to allow overrides by those with a different privilege set. 

 

Here's the scenario:

 

A user with privilege set "Basic" tries to put in a value into a field that is out of a specific range based on a calculation. I would like this user to find someone with Privilege set "Super" to click an override button, which would ask for their username and password. Once entered, FM would verify that they are one of the users with privilege set "Super" and then allow the field. The original user would then continue to use the database with their account. 

 

Link to comment
Share on other sites

The only way you can verify that the person asking for access is entitled to have it is through the login process. So that "override button, which would ask for their username and password" needs to call the Re-Login[] script step. Unfortunately (or fortunately, depending on your point of view), there is no provision to automatically re-login back to the original account; the "Basic" user will have to re-enter their credentials (or at least the password) after the supervisor has logged out.

Link to comment
Share on other sites

Thanks Comment. I think this will work just fine for me. We use FMGo on iPods so it makes sense that you would have to at least put your password in when you hand it to someone else. The easiest way I have found is to do the following:

 

Set variable [$user]

Re-Login

If [Get (AccountPrivilegeSetName) = "Super"

        Perform Action

    Else

    Show Custom Dialog ["That user is not authorized"]

    Exit Script

Re-Login [user = $user]

 

 

 

Just out of curiosity, do Globals carry over during a re-login?

Link to comment
Share on other sites

Re your script: the way you have it now, when the supervisor hands the device back, it is still the supervisor that is logged in. You need to ask yourself what happens if the original user does NOT enter his/her password.

 

 

do Globals carry over during a re-login?

 

That's a very good question. I suspect they do, but I don't know for sure. In any case, I suppose your script's "action" includes creating a record of what was done (and by whom), so you do have a place to deposit your valuables for the transit.

Link to comment
Share on other sites

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