Role-Based Security and Records...


Author
Message
StarkMike
StarkMike
Advanced StrataFrame User (542 reputation)Advanced StrataFrame User (542 reputation)Advanced StrataFrame User (542 reputation)Advanced StrataFrame User (542 reputation)Advanced StrataFrame User (542 reputation)Advanced StrataFrame User (542 reputation)Advanced StrataFrame User (542 reputation)Advanced StrataFrame User (542 reputation)Advanced StrataFrame User (542 reputation)
Group: Forum Members
Posts: 436, Visits: 944
I have a table that contains rows, obviously. Hehe Each of the rows in my table represents a different report. I would like to use role based security to manage which user has access to which report. What I'll do is fill a listview and give them the ability to select and print multiple reports at once. When I fill the listview, I'll only want it to fill it with rows(reports) that this user has access to.

I hope this makes sense.

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Create a column in your table with the permission required to run the report.  Then manually test on the permission:

If SecurityBasics.CurrentUser.GetPermission("MyPermission").Action = MicroFour.StrataFrame.Security.PermissionAction.Grant Then
   '-- Run the report
End If

There is a lot of documentation about security.  If you read through it it may help you to better understand the class structure and how to manually implement security in custom situations.  Don't get me wrong, we are glad to answer any questions you have out here on the forum and these are valid questions, I just did not know if you were aware of how much security documentation that existed.

StarkMike
StarkMike
Advanced StrataFrame User (542 reputation)Advanced StrataFrame User (542 reputation)Advanced StrataFrame User (542 reputation)Advanced StrataFrame User (542 reputation)Advanced StrataFrame User (542 reputation)Advanced StrataFrame User (542 reputation)Advanced StrataFrame User (542 reputation)Advanced StrataFrame User (542 reputation)Advanced StrataFrame User (542 reputation)
Group: Forum Members
Posts: 436, Visits: 944
You're saying that the column in the Reports table would contain the permissionkey and then use that permission key to look up the permission at runtime? If I had 50 records to check and then add to the listview would that cause a considerable processing lag?

When you say security documentation do you mean the Role-Based Security Help file or security documentation in general? Because I have read most of the RBS help file and very little on security in general. Everything we do is in house and not exposed to the outside world so there is little need beyond basic permissions.

Thanks. Your suggestion will help. Because what I would like to have is one central way to manage permissions and I like what RBS has to offer. Cool

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
You're saying that the column in the Reports table would contain the permissionkey and then use that permission key to look up the permission at runtime?

Yes.

If I had 50 records to check and then add to the listview would that cause a considerable processing lag?

No.  These requests are scalar, so it will be fast.  If you have a problem, show all of the reports and just test the security when the end-user tries to run the report.

When you say security documentation do you mean the Role-Based Security Help file or security documentation in general?

It is the Security Help.chm file.  Attached here is the latest version in case you do no have it downloaded.

Attachments
Security Help.zip (158 views, 1.00 MB)
StarkMike
StarkMike
Advanced StrataFrame User (542 reputation)Advanced StrataFrame User (542 reputation)Advanced StrataFrame User (542 reputation)Advanced StrataFrame User (542 reputation)Advanced StrataFrame User (542 reputation)Advanced StrataFrame User (542 reputation)Advanced StrataFrame User (542 reputation)Advanced StrataFrame User (542 reputation)Advanced StrataFrame User (542 reputation)
Group: Forum Members
Posts: 436, Visits: 944
Thanks Trent, you and Ben are top notch.
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Thanks...we are glad to help! Smile
StarkMike
StarkMike
Advanced StrataFrame User (542 reputation)Advanced StrataFrame User (542 reputation)Advanced StrataFrame User (542 reputation)Advanced StrataFrame User (542 reputation)Advanced StrataFrame User (542 reputation)Advanced StrataFrame User (542 reputation)Advanced StrataFrame User (542 reputation)Advanced StrataFrame User (542 reputation)Advanced StrataFrame User (542 reputation)
Group: Forum Members
Posts: 436, Visits: 944
I have another question related to this topic... I have since created a maintenance for to manage this table in a run-time scenario and was wondering if there was a way I could use the Security Key Type Editor so that I could look up a key and then have it return that key name so I could insert that into the field in my table.
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Yes, you can use the type editor.  It  is just a class within the MicroFOur StrataFrame Extensibility.DLL.  However, this can be used as design-time only.

The UI Type Editor class is called SecurityKeyTypeEditor.  You can also call the form directly and provide the parms which would be the SecurityKeyTypeEditorDialog.

StarkMike
StarkMike
Advanced StrataFrame User (542 reputation)Advanced StrataFrame User (542 reputation)Advanced StrataFrame User (542 reputation)Advanced StrataFrame User (542 reputation)Advanced StrataFrame User (542 reputation)Advanced StrataFrame User (542 reputation)Advanced StrataFrame User (542 reputation)Advanced StrataFrame User (542 reputation)Advanced StrataFrame User (542 reputation)
Group: Forum Members
Posts: 436, Visits: 944

So If i understand correctly, you're telling me that i can use the SecurityKeyTypeEditor but only at design time... OR i can call the SecurityKeyTypeEditorDialog and after passing a few params i could use it at run-time. Right?


Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Actually you cannot distribute the MicroFour StrataFrame Extensibility.DLL file.  Aside from this even if you could distribute the DLL it would not work as you are expecting at run-time since it requires the StrataFrame database and all of the meta-data.  No SF type editors will work at run-time on your distributed application.

A type editor is not the solution for anything that is done at run-time unless you are writing a development tool.  You are more in need of a browse dialog type of scenario than a type editor from the sound of it.

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