Dynamically setting user roles?


Author
Message
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (4.8K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
The application I am considering StrataFrame for is project based. I.e. the data is all related to a project and the users role is based on project. On one project a user might be the project manager, having more permissions and on another she might be a reader, only able to view data, no edit/add/delete it. Is this possible using StrataFrames security?



As I see it, the user would be authenticated, then I would need to see what project they are working on and then change their role. This is probably covered in the helf file, but I'm running out of time to evaluate StrataFrame :-/



Thanks for you help!
Replies
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (4.8K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
I don't know what happened here because I remember Ben responding to this as I walked out of the office the other day. So I am sorry for any trouble. He must have accidentally closed before posting or something.




Figured something like that must have happened. No worries. You guys have been very good about being responsive and very helpful. And when this did fall through the cracks, you got right back on it. Excellent.





You are basically looking at being your own SecurityDialog




Is the SecurityDialog the form that allows you to manage users/roles/permissions? I'd still use this to create roles, users and set permissions for roles, but use my own to define which role a user gets on any specific app project. Right?



What I'm still really unclear about is what exactly happens in the ShowLoginAndInitMainForm sub in AppMain.vb. There is one line of code there that calls the logon form, authenticates the user, sets that user as the current user (unless they cancel, then it closes the app), then opens the main form. Seems like I will need to take control of this so I can insert the project related stuff. Will I need to user my own login form? I assume this work doesn't happen in a form, right?



I think I can figure out how to manipulate the permission (I take a look at the help topic you noted), but I don't understand what I'd have to do to end up with a logged on user if I have to do it myself.



If you go to the user individual permissions level you will have to move the number of records that pertain to your project settings. Just a tip Smile




Good tip Wink



I'll take a look at all the info you indicated also.
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (4.8K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
OK, first question about updating the SFSUserXRoles table. There is a ur_CreatedBy and ur_CreatedAt fields, both required. Do I need to set values for these? I'd use the SFSUserXRolesBO to do this, I assume. If so, who would be the user? The security user? How would I use that logon to do this work?



First of many questions, I'm sure...
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
ur_CreatedBy and ur_CreatedAt fields

Leave these fields alone..they will be automatically set through the default values of the BO.

I'd use the SFSUserXRolesBO to do this, I assume. If so, who would be the user? The security user? How would I use that logon to do this work?

You can leave these alone if you would like.  However, you can set these to the user PK value associated with your administrator user.  This is generally a -1 for the user PK.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Greg McGuffey - 19 Years Ago
Trent L. Taylor - 19 Years Ago
Greg McGuffey - 19 Years Ago
Trent L. Taylor - 19 Years Ago
                     Ah! I see the confusion. Not projects at all in terms of...
Greg McGuffey - 19 Years Ago
                         Yes...that makes much more sense...What I would do in this case is...
Trent L. Taylor - 19 Years Ago
                             Almost. :D

This seems to me that what you just suggested if...
Greg McGuffey - 19 Years Ago
                                 You will have to keep track of the roles assigned to each users on a...
StrataFrame Team - 19 Years Ago
                                     Yep, I was planning on tracking the user/role/project myself and on...
Greg McGuffey - 19 Years Ago
                                         OK, not so quick reply :ermm:

I've been trying to figure...
Greg McGuffey - 19 Years Ago
                                             [quote] OK, not so quick reply [/quote] I don't know what happened...
Trent L. Taylor - 19 Years Ago
                                                 [quote]I don't know what happened here because I remember Ben...
Greg McGuffey - 19 Years Ago
                                                     OK, first question about updating the SFSUserXRoles table. There is a...
Greg McGuffey - 19 Years Ago
                                                         [quote]ur_CreatedBy and ur_CreatedAt fields[/quote] Leave these...
Trent L. Taylor - 19 Years Ago
                                                 [quote]You can learn more about this under the web applications...
Greg McGuffey - 19 Years Ago
                                                     I am not sure when you last downloaded...but if you get the latest...
Trent L. Taylor - 19 Years Ago
                                                         Thanks for the quick replies.

I was hoping that was the...
Greg McGuffey - 19 Years Ago
                                                             There are a number of enhancements and updates to the framework in...
Trent L. Taylor - 19 Years Ago
                                                                 Will do. The new help file really helped. You didn't directly answer...
Greg McGuffey - 19 Years Ago
                                                                     [quote]Did I miss anything? [/quote] I think you're good :)...
Trent L. Taylor - 19 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search