Class GenericRight
Base class for TableRight, FieldRight and FunctionRight. Provides a read-only reason field. Sub-classes define one or more permissions that the right can allow. For example: FieldRight defines Read+Write+Mandatory rights on a field.
Inherited Members
Namespace: SuperOffice.CRM.Security
Assembly: SoCore.dll
Syntax
[DataContract(Namespace = "http://www.superoffice.net/ws/crm/NetServer/10.3.0.0")]
public abstract class GenericRight
Remarks
Get fresh rights from the PrivateSentryAgentFactory, where they are made to order. Rights are read-only, static objects. You cannot modify a field-right or table right object. This is because a field-right object may be a shared instance, so modifying it will modify all fields, not just one.
Constructors
GenericRight()
Base class for TableRight, FieldRight and FunctionRight. Provides a read-only reason field. Sub-classes define one or more permissions that the right can allow. For example: FieldRight defines Read+Write+Mandatory rights on a field.
Declaration
protected GenericRight()
Remarks
Get fresh rights from the PrivateSentryAgentFactory, where they are made to order. Rights are read-only, static objects. You cannot modify a field-right or table right object. This is because a field-right object may be a shared instance, so modifying it will modify all fields, not just one.
Fields
_reason
Base class for TableRight, FieldRight and FunctionRight. Provides a read-only reason field. Sub-classes define one or more permissions that the right can allow. For example: FieldRight defines Read+Write+Mandatory rights on a field.
Declaration
[DataMember(Name = "Reason")]
protected string _reason
Field Value
Type | Description |
---|---|
string |
Remarks
Get fresh rights from the PrivateSentryAgentFactory, where they are made to order. Rights are read-only, static objects. You cannot modify a field-right or table right object. This is because a field-right object may be a shared instance, so modifying it will modify all fields, not just one.
Properties
HasAll
Returns true if the right has all the permissions implied by the right.
Declaration
public abstract bool HasAll { get; }
Property Value
Type | Description |
---|---|
bool |
Remarks
For a FunctionRight this implies that the right is active. For a FieldRight this implies that the field has Read+Write permissions.
HasNone
Returns true if the right has none of the permissions implied by the right.
Declaration
public abstract bool HasNone { get; }
Property Value
Type | Description |
---|---|
bool |
Remarks
For a FunctionRight this means that the right is not active. For a FieldRight this means that the field is hidden (no read+no write permission)
IgnoreReason
Should the reason be ignored?
Declaration
protected abstract bool IgnoreReason { get; }
Property Value
Type | Description |
---|---|
bool |
Remarks
Get fresh rights from the PrivateSentryAgentFactory, where they are made to order. Rights are read-only, static objects. You cannot modify a field-right or table right object. This is because a field-right object may be a shared instance, so modifying it will modify all fields, not just one.
Reason
Contains a string that explains why the right is not available. The reason is blank if HasAll is true.
Declaration
public string Reason { get; }
Property Value
Type | Description |
---|---|
string |
Remarks
Get fresh rights from the PrivateSentryAgentFactory, where they are made to order. Rights are read-only, static objects. You cannot modify a field-right or table right object. This is because a field-right object may be a shared instance, so modifying it will modify all fields, not just one.