I just wanted to share what I did to accomplish this.
I have a button that launchs the Inventory Transaction Number Dialog, I want this Dialog to show only to the Warehouse Manager Role:
Private Sub TransTypeEventHandler(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdTransacTypes.Click
Using rol As New MicroFour.StrataFrame.Security.BusinessObjects.SFSRolesBO
rol.FillAllByUser(MicroFour.StrataFrame.Security.SecurityBasics.CurrentUser.UserPK)
If rol.Seek("rl_Role='Warehouse Manager'") Then
LaunchForm(GetType(InventoryTransactListEditor))
Else
MicroFour.StrataFrame.Messaging.MessageForm.ShowMessage("Access Denied.")
End If
End Using
End Sub
Even if the user has the IsAdministrator check he wont be able to Launch the Dialog if he doesn´t belong to the requested role.
Note: I haven´t tested the result when deleting the "Warehouse Manager" Role from the Security Tables.
Cheers
------------------------------------------------------------------------
I would like to change the world, but they don´t give me the source code.
MS Windows 7 Ultimate 64-Bit
Intel(R) Core(TM)2 Quad CPU Q9300 2.50 GHz
6.00 GB of RAM, NVIDIA GeForce 9800 GT
MacBook Pro i5 OSX Lion