StrataFrame Forum

Deny by default

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

By Chan - 11/24/2008

Hi,

I found that, if any permission key given is found from database, it will auto be granted.

Is there any setting to change this behavour to always denied if not exist? Or, I need to subclasss LoggedInUser class?



Thank you
By Ivan George Borges - 11/24/2008

Hi Chan.

Work with the DefaultPermissionAction

  1. Specify Default Security Settings - The default permission action, blocked message (using plain text or a message key), replacement character, and replacement regex are specified using the following assignments within the InitApplication() method.  These may be changed as desired.

    Security Settings (Visual Basic)
    '-- Set the default actions for security enabled objects within the applicationSecurityBasics.DefaultPermissionInfo = New PermissionInfo(PermissionAction.Deny, _    "Access Denied.", DeniedActions.Message)SecurityBasics.DefaultPermissionAction = PermissionAction.DenySecurityBasics.DefaultBlockedMsg = "Access Denied."'SecurityBasics.DefaultBlockedMsgKey = "AccessDeniedKey"SecurityBasics.BlockedReplacementCharacter = "*"cSecurityBasics.BlockedReplacementRegex = "[A-Za-z0-9@]"
By Ivan George Borges - 11/24/2008

Sorry, I pasted from the docs and didn't properly formatted it.

Specify Default Security Settings - The default permission action, blocked message (using plain text or a message key), replacement character, and replacement regex are specified using the following assignments within the InitApplication() method.  These may be changed as desired.

Security Settings (Visual Basic)
'-- Set the default actions for security enabled objects within the application
SecurityBasics.DefaultPermissionInfo = New PermissionInfo(PermissionAction.Deny, _
    "Access Denied.", DeniedActions.Message)
SecurityBasics.DefaultPermissionAction= PermissionAction.Deny
SecurityBasics.DefaultBlockedMsg = "Access Denied."
'SecurityBasics.DefaultBlockedMsgKey = "AccessDeniedKey"
SecurityBasics.BlockedReplacementCharacter = "*"c
SecurityBasics.BlockedReplacementRegex = "[A-Za-z0-9@]"