Class Permission
Describes a security permission applied either to a Model
Implements
Inherited Members
Namespace: TimeCockpit.Data.Security
Assembly: TimeCockpit.Data.dll
Syntax
public class Permission : ModelElement, IDynamicMetaObjectProvider, INotifyPropertyChanged, IDataErrorInfo
Constructors
Permission()
Initializes a new instance of the Permission class.
Declaration
public Permission()
Permission(IEnumerable<KeyValuePair<Object, Object>>)
Initializes a new instance of the Permission class.
Declaration
public Permission(IEnumerable<KeyValuePair<object, object>> properties)
Parameters
Type | Name | Description |
---|---|---|
System. |
properties | Collection of properties. |
Permission(Permission)
Initializes a new instance of the Permission class.
Declaration
public Permission(Permission element)
Parameters
Type | Name | Description |
---|---|---|
Permission | element | The element to copy. |
Properties
AccessType
Gets or sets the Access
Declaration
public PermissionType AccessType { get; set; }
Property Value
Type | Description |
---|---|
Permission |
Condition
Gets or sets a TCQL expression that returns either true or false.
Declaration
public string Condition { get; set; }
Property Value
Type | Description |
---|---|
System. |
Function
Gets the CLR function for the Permission
Declaration
public Func<EntityObject, Environment, IEnumerable<QueryParameter>, object> Function { get; }
Property Value
Type | Description |
---|---|
System. |
Remarks
The function needs the Entity
IsDisabled
Gets or sets a value indicating whether the Permission is disalbed or not.
Declaration
public bool IsDisabled { get; set; }
Property Value
Type | Description |
---|---|
System. |
|
Message
Gets or sets the message of the Permission.
Declaration
public string Message { get; set; }
Property Value
Type | Description |
---|---|
System. |
The message of the Permission. |
Methods
Accept(ModelElementVisitor)
Accepts a visitor. Dispatches the correct visit handler in the visitor for the Permission
Declaration
public override void Accept(ModelElementVisitor visitor)
Parameters
Type | Name | Description |
---|---|---|
Model |
visitor | the visitor to accept. |
Overrides
Validate(ref IList<PropertyValidationMessage>, Boolean)
Validates a Model
Declaration
protected override void Validate(ref IList<PropertyValidationMessage> messages, bool validateRecursively)
Parameters
Type | Name | Description |
---|---|---|
System. |
messages | An list of strings that stores that picks up the validation errors of a model element. |
System. |
validateRecursively | Indicates wheter to validate only the current model element or all its children (recursively) as well. |
Overrides
Remarks
The rules the Model
When Validate(ref IList<PropertyValidationMessage>, Boolean) is called on a modelelement, the Validate(ref IList<PropertyValidationMessage>, Boolean) method of all children attatched to the modelelemnt are validated recursivly.