StrataFrame Forum
Back
Login
Login
Home
»
Updates and Information
»
StrataFrame Users Contributed Samples
»
Adding SF SecurityKey type editor to custom class
Adding SF SecurityKey type editor to custom class
Post Reply
Like
2
Adding SF SecurityKey type editor to custom class
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
RSS Feed
Goto Topics Forum
Author
Message
Edhy Rijo
E
Edhy Rijo
posted 15 Years Ago
ANSWER
Topic Details
Share Topic
E
Group: StrataFrame Users
Posts: 2.4K,
Visits: 23K
Hi All,
I use the StrataFlix sample approach for some of my applications, and the StrataFlix uses a class named ActionLinkMenuItem.vb to substitute the standard ToolStrip menu with some nice links added on left side of the screen.
Adding Role Base Security to my application I had the need to control these Action Link Menu Items via a SecurityKey like many of the SF controls, so I when back to the SF source code and found how they created these properties for other controls and simply added to the ActionLinkMenuItem.vb class and voila! now all my Action Link Menu Items have a SecurityKey property linked to the SF SecurityKeyTypeEditor to allow me to lookup my security keys and assign it to this control.
So here is the property code which you can find in the SF source:
Private _SecurityKey As String = ""
'''
''' Sets the permission key using the SF SecurityKey type editor
'''
DefaultValue(""), _
Description("The permission key used to determine whether the current user has permission to action assigned to this menu."), _
Editor(MicroFour.StrataFrame.Extensibility.Constants.TE_SecurityKeyTypeEditor, GetType(UITypeEditor))> _
Public Property SecurityKey() As String
Get
Return _SecurityKey
End Get
Set(ByVal value As String)
_SecurityKey = value
End Set
End Property
Of course this can be added to any custom class we may need to extend to make our life easier. If you copy this code just make sure to replace the
with your own description.
Edhy Rijo
Reply
Like
2
Russell Scott Brown
Russell Scott Brown
posted 15 Years Ago
ANSWER
Post Details
Share Post
Group: Forum Members
Posts: 124,
Visits: 597
Thanks. This is very helpful.
Russ Brown (Using C#2010/SQL Server 2008)
Reply
Like
1
GO
Merge Selected
Merge into selected topic...
Merge into merge target...
Merge into a specific topic ID...
Open Merge
Post Reply
Like
2
Similar Topics
Post Quoted Reply
Reading This Topic
Login
Login
Remember Me
Reset Password
Resend Validation Email
Login
Explore
Messages
Mentions
Search