Loading...
 

CX_CLASS_SECURITY - Access rights for classes

CX_CLASS_SECURITY

Class hierarchy
Description:

Access rights are defined for all objects of a class. The write and read rights initially apply to all data fields (including dynamic data fields) of the class. For certain access expressions, different rights can be defined with objects of the CX_ATTRIBUTE_SECURITY class ( accessExpressionsfield ).

The following additional generalisations apply to function calls and indices:

Objects of the class CX_CLASS_SECURITY describe the access rights for a set of objects. The data field specialisations refers to (subordinate) security objects with deviating specifications for subsets (e.g. for derived classes or for selected instances of a class). The subordinate security objects are only evaluated if the parent object could already provide a statement.

Example:

The classes A, A1, A2 and B exist, whereby A1 and A2 are derived from A:

CX SECURITY SET Tree

A CX_CLASS_SECURITY object for A - bit flag 4 is 0 - describes the access rights for all objects of classes A, A1 and A2: object setMA. Different rights are to apply to objects of class A1 (setMA1). BecauseMA > MA1, the corresponding security object describes a specialisation and can be subordinated to the security object for A. The same applies to an object of the class A1. The same applies to an object of the class CX_OBJECT_SECURITY, which refers to selected instances of A1: MA > MA1>MObjects. On the other hand, it makes no sense to consider a security object for class B as a specialisation of the object for A:MB is not a subset ofMA.

If several security objects are responsible for one class/object in specialisations, the last object wins. The behaviour was different before Dll version 225901.

CX SECURITY SET3

Code example:
CreatePersObject(CX_CLASS_SECURITY) -> securityObject String(CX_CLASS_SECURITY::name, 150, 4, 220) Enum(CX_CLASS_SECURITY::objectClassID, 150, 14, 220, 50, "GetClassNames()") Checkbox(CX_CLASS_SECURITY::flags[4], 360, 16, 140, T("Ohne Vererbung", "Without inheritance"))

List of methods (MDI)
Function MA* Parameters Return Brief description
ClassName STRING Class name
Register Register security object
TestClass
225901
INTEGERCX_BIT_PATTERNReturns the class access for a specific class.
TestMessage
225661
INTEGERTRUE/FALSETest whether message is allowed or blocked
TestObject
225901
OBJECT, STRINGCX_BIT_PATTERNReturns the object access for a specific object (+ path).
TestOption
225735
INTEGERTRUE/FALSETest whether option is allowed or blocked.

* MA = Member Access Function

Data directory (DDI)
Data field Type Reference class I* Brief description
specializations COLL CX_SECURITY subordinate security objects
name STRING Description
accessExpressions COLL CX_ATTRIBUTE_SECURITY Objects of class CX_ATTRIBUTE_SECURITY
objectClassID ENUMSHORT identifies the class for which access rights are defined.
flags INTEGER
ValueDescription
0x01Read allowed
0x02Write allowed
0x04Create object allowed
0x08Delete object allowed
0x10Set = rights only apply to exactly this class

Not set = rights also apply to derived classes

I = Indexable data field

Use in AppsWH
Module Brief description
secclass.mod Access rights for classes Editing module