Permission to change field value


Author
Message
Chan
Chan
Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
Hi,

I need to allow user to specify which user has permission to offer 100% discount to customer. Where could I call GetPermission() to prevent unauthorized user to specify "invalid" value?



Thank you
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
This would just require that you call the GetPermission method within your application before allowing someone to apply a 100% discount.  For example, if you have a button that allows this to happen, you could hide or disable the button or link when the form is being initialized (Load or Constructor).  You could also place this logic when the button or link is clicked and show a message if they do not have permission.

If Not SecurityBasics.CurrentUser.GetPermission("100% Discount").Action = PermissionAction.Grant Then
        MyDiscountButton.Enabled = False
End If

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