Is it possible to temporarily apply admin or last logged in user rights in order to close forms?


Author
Message
Cory Cookson
Cory Cookson
StrataFrame Novice (112 reputation)StrataFrame Novice (112 reputation)StrataFrame Novice (112 reputation)StrataFrame Novice (112 reputation)StrataFrame Novice (112 reputation)StrataFrame Novice (112 reputation)StrataFrame Novice (112 reputation)StrataFrame Novice (112 reputation)StrataFrame Novice (112 reputation)
Group: Forum Members
Posts: 30, Visits: 416
Scenario:

1) User 1 logs in with admin rights and opens up form1

2) Lock Screen happens due to timeout or pushing F11

3) User 2 logs in with lower rights than User 1

4) Here I want to close form1 so that User 2 has a fresh start with no open screens.

Question:

Is there a way to temporarily provide admin or the last users rights so that open forms can be closed programatically and then return to using User 2's rights?

Cory Cookson

Software Developer

Occupational Health Research

Reply
Dustin Taylor
Dustin Taylor
StrataFrame Team Member (938 reputation)
Group: StrataFrame Users
Posts: 364, Visits: 771
Once you change the user you will have to call LockSession again to refresh the form states. You'll have to account for this in your AfterSessionLock logic, however, to prevent it from getting into an infinite loop.

That said, this isn't what I would recommend to handle the issue of unclosable locked forms. The session locking works the way it does for a reason, namely that users lower privileges should not be able to tamper with the work done by users of higher privileges (including discarding changes made by the administrator). That is why they have the different levels, to prevent one from having access to the other.  As such, if you want to avoid the situation where an administrator logs out, and then a standard users logs in and can't close some open forms, I would recommend enforcing the administrator to save and close their work before logging out, rather than upping the permissions of the standard user to allow them access to explicitly denied forms or functions.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Cory Cookson - 17 Years Ago
Ivan George Borges - 17 Years Ago
Trent L. Taylor - 17 Years Ago
Cory Cookson - 17 Years Ago
Cory Cookson - 17 Years Ago
Greg McGuffey - 17 Years Ago
Cory Cookson - 17 Years Ago
Ivan George Borges - 17 Years Ago
Cory Cookson - 17 Years Ago
Ivan George Borges - 17 Years Ago
Cory Cookson - 17 Years Ago
Cory Cookson - 17 Years Ago
     bump
Cory Cookson - 17 Years Ago
Ivan George Borges - 17 Years Ago
Dustin Taylor - 17 Years Ago
Cory Cookson - 17 Years Ago
Cory Cookson - 17 Years Ago
             Great, Cory! :cool:
Ivan George Borges - 17 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search