StrataFrame Forum

Permission to change field value

http://forum.strataframe.net/Topic12037.aspx

By Chan - 10/17/2007

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
By Trent L. Taylor - 10/19/2007

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