How to determine a specific permission for a user who is not the CurrentUser


Author
Message
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
So the question is, how do I do step 1?

Well, a user is going to have to be logged in to retrieve any permissions to test on.  Once they are logged in, you can start swapping things around...I had posted a reply to you at some point about creating a custom login form...you can look at that to get an idea possibly.  But you will have to login in order to retrieve permissions (at least through the normal framework functionality).  You can use the SF security business objects and manually load the BO to get the data you want to look at before the login occurs.  That is really the only way I know how to answer you on this one Ermm.

Greg McGuffey
Greg McGuffey
Strategic Support Team Member (4.8K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
This question is related to my post on how to dynamically set a user's role based on some data (http://forum.strataframe.net/Topic3970-21-1.aspx).



As the plot thickens...



Not all users have their access controlled at the project (application defined 'project', not a VS project) level. Some are 'enterprise' users, who automatically get access to all projects. I have a permission setup, 'AllProjectAccess', which will used to determine which users need access based on project and which have access to all projects.



If the user was logged on when I needed this, this would be easy:



SecurityBasics.CurrentUser.GetPermission("AllProjectAccess").Action



Unfortunately, the user isn't logged in yet. I have a custom login form that handles the OK click and within this procedure, I need to determine:



1. Is the user an enterprise user or a project level user

2. Get default project for user (applies to all users)

3. If user is a project level user, setup appropriate role(s) for the project



When this is done, I continue on with the process, calling me.OnLoginAttempt(), letting the framework do its magic.



So the question is, how do I do step 1? I want to user the framework to handle all the complexities that can occur to finally determine what the action is for that permission.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search