StrataFrame Security Documentation Send comments on this topic.
Business Object-Level Security Keys

Glossary Item Box

Business Object Security Keys

Like all business object properties, the business object security key properties can be set within the component designer for the business object to affect all instances of the business object, or set directly on an instance of a business object that has been dropped on a form to set the property for that one instance only.

Assigning the Key

Assigning the business object security key properties can be done through the property sheet of the business object’s component designer or programmatically. The Security Key Type Editor is used to search for the appropriate security key to assign to the values for the properties.

Sample - Business Object Security Keys [Visual Basic]
Public Sub TestSecurity()
    '-Create a new business object
    Dim loBo As New MyBusinessObject()

    '-Test the Add security
    loBo.AddSecurityKey = "MyAddSecurityKey"
    loBo.Add()

    '-Test the Edit security
    loBo.EditSecurityKey = "MyEditSecurityKey"
    loBo.Edit()

    '-Test the Delete security
    loBo.DeleteSecurityKey = "MyDeleteSecurityKey"
    loBo.DeleteCurrentRow()
End Sub

Sample - Business Object Security Keys [C#]
public void TestSecurity()
{
    //-- Create a new business object
    MyBusinessObject loBo = new MyBusinessObject();

    //-- Test the Add security
    loBo.AddSecurityKey = "MyAddSecurityKey";
    loBo.Add();

    //-- Test the Edit security
    loBo.EditSecurityKey = "MyEditSecurityKey";
    loBo.Edit();

    //-- Test the Delete security
    loBo.DeleteSecurityKey = "MyDeleteSecurityKey";
    loBo.DeleteCurrentRow();
}

How the Security Keys Affect Business Objects at Run-time

Each security key property has a corresponding method that performs an action on the business object (AddSecurityKey affects calls to Add(), EditSecurityKey affects calls to Edit()). These methods, Add(), Edit(), and DeleteCurrentRow() have overloads that accept Boolean value that indicate whether the business object should check the current user’s permissions before performing the action. The default overload checks the users permissions.

When the security is checked, and the permission is denied, the SecurityDenied event will be raised. This event is automatically handled by the StandardForm class to show a message to the end user depending upon the denied action of the requested permission. This automation can be disabled so that you can handle the denying of the requested action manually.