Class FieldRight
Wraps the field right together with an explanatory reason. Also adds logical operators to the field rights so that they can be easily combined.
Implements
Inherited Members
Namespace: SuperOffice.CRM.Security
Assembly: SoCore.dll
Syntax
[DataContract(Namespace = "http://www.superoffice.net/ws/crm/NetServer/10.3.0.0")]
public sealed class FieldRight : ItemRight, ICloneable
Remarks
Usually obtained from the SuperOffice.CRM.Security.RightsFactory rather than created directly by the client.
Constructors
FieldRight()
Create a blank field-right with no permissions.
Declaration
public FieldRight()
Remarks
Usually obtained from the SuperOffice.CRM.Security.RightsFactory rather than created directly by the client.
FieldRight(EFieldRight)
Create a field right with the given permission.
Declaration
public FieldRight(EFieldRight right)
Parameters
Type | Name | Description |
---|---|---|
EFieldRight | right | Bitflag of field permissions |
Remarks
Usually obtained from the SuperOffice.CRM.Security.RightsFactory rather than created directly by the client.
FieldRight(EFieldRight, string)
Create a field right with the given permission.
Declaration
public FieldRight(EFieldRight right, string theReason)
Parameters
Type | Name | Description |
---|---|---|
EFieldRight | right | Bitflag of field permissions |
string | theReason | Description of why permissions are restricted |
Remarks
Usually obtained from the SuperOffice.CRM.Security.RightsFactory rather than created directly by the client.
Properties
CanUIRead
Can this field be read in the user interface.
Declaration
public bool CanUIRead { get; }
Property Value
Type | Description |
---|---|
bool |
Remarks
Usually obtained from the SuperOffice.CRM.Security.RightsFactory rather than created directly by the client.
CanUIUpdate
Can this field be updated in the user interface.
Declaration
public bool CanUIUpdate { get; }
Property Value
Type | Description |
---|---|
bool |
Remarks
Usually obtained from the SuperOffice.CRM.Security.RightsFactory rather than created directly by the client.
HasAll
Returns true when all of Read, Write permissions are available. Required permissions are ignored. Equivalent to the IsActive property.
Declaration
public override bool HasAll { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
Remarks
Usually obtained from the SuperOffice.CRM.Security.RightsFactory rather than created directly by the client.
HasNone
Returns true when no permissions are available. No read, write or required permissions.
Declaration
public override bool HasNone { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
Remarks
Usually obtained from the SuperOffice.CRM.Security.RightsFactory rather than created directly by the client.
IgnoreReason
Should the reason be ignored?
Declaration
protected override bool IgnoreReason { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
Remarks
Usually obtained from the SuperOffice.CRM.Security.RightsFactory rather than created directly by the client.
IsActive
Returns true when the field is editable. (Read+Write permissions). Equivalent to the HasAll property.
Declaration
public override bool IsActive { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
Remarks
Usually obtained from the SuperOffice.CRM.Security.RightsFactory rather than created directly by the client.
IsMandatory
Returns true when the field must be filled out.
Declaration
public bool IsMandatory { get; }
Property Value
Type | Description |
---|---|
bool |
Remarks
Usually obtained from the SuperOffice.CRM.Security.RightsFactory rather than created directly by the client.
IsUIMandatory
Is it mandatory to fill in htis field in the user interface.
Declaration
public bool IsUIMandatory { get; }
Property Value
Type | Description |
---|---|
bool |
Remarks
Usually obtained from the SuperOffice.CRM.Security.RightsFactory rather than created directly by the client.
IsVisible
Returns true when the field is readable.
Declaration
public bool IsVisible { get; }
Property Value
Type | Description |
---|---|
bool |
Remarks
Usually obtained from the SuperOffice.CRM.Security.RightsFactory rather than created directly by the client.
Mask
Returns the bitflag of permissions.
Declaration
public EFieldRight Mask { get; }
Property Value
Type | Description |
---|---|
EFieldRight |
Remarks
Usually obtained from the SuperOffice.CRM.Security.RightsFactory rather than created directly by the client.
Methods
And(EFieldRight, EFieldRight)
Combine two field rights returning the intersection of the two rights.
Declaration
public static EFieldRight And(EFieldRight r1, EFieldRight r2)
Parameters
Type | Name | Description |
---|---|---|
EFieldRight | r1 | The first right. |
EFieldRight | r2 | The second right. |
Returns
Type | Description |
---|---|
EFieldRight | The resulting right. |
Remarks
Read and Writhe rights are ANDed and UIHints are ORed
CanDo(EFieldRight)
Return true if the any of the specified permissions are active.
Declaration
public bool CanDo(EFieldRight right)
Parameters
Type | Name | Description |
---|---|---|
EFieldRight | right | Bitflag of permissions |
Returns
Type | Description |
---|---|
bool | True if any of the bits in the parameter are set in this right. |
Remarks
Usually obtained from the SuperOffice.CRM.Security.RightsFactory rather than created directly by the client.
CanDoAll(EFieldRight)
Return true if all of the specified permissions are active.
Declaration
public bool CanDoAll(EFieldRight right)
Parameters
Type | Name | Description |
---|---|---|
EFieldRight | right | Bitflag of permissions |
Returns
Type | Description |
---|---|
bool | True if all of the bits in the parameter are set in this right |
Remarks
Usually obtained from the SuperOffice.CRM.Security.RightsFactory rather than created directly by the client.
Clone()
Return a new instance of the field right object.
Declaration
public object Clone()
Returns
Type | Description |
---|---|
object | Copy of the field right |
Remarks
Usually obtained from the SuperOffice.CRM.Security.RightsFactory rather than created directly by the client.
DemandAllRights(EFieldRight)
Test the permissions and throw a SoSentryException if not all of the specified rights are set.
Declaration
public void DemandAllRights(EFieldRight right)
Parameters
Type | Name | Description |
---|---|---|
EFieldRight | right | Bitflag of rights |
Remarks
Usually obtained from the SuperOffice.CRM.Security.RightsFactory rather than created directly by the client.
DemandRight(EFieldRight)
Test the permissions and throw a SoSentryException if none of the specified rights are set.
Declaration
public void DemandRight(EFieldRight right)
Parameters
Type | Name | Description |
---|---|---|
EFieldRight | right | Bitflag |
Remarks
Usually obtained from the SuperOffice.CRM.Security.RightsFactory rather than created directly by the client.
Or(EFieldRight, EFieldRight)
Combine two field rights rturning the union of the two rights.
Declaration
public static EFieldRight Or(EFieldRight r1, EFieldRight r2)
Parameters
Type | Name | Description |
---|---|---|
EFieldRight | r1 | The first right. |
EFieldRight | r2 | The second right. |
Returns
Type | Description |
---|---|
EFieldRight | The resulting right. |
Remarks
Read and Writhe rights are ORed and UIHints are ANDed
ToString()
Wraps the field right together with an explanatory reason. Also adds logical operators to the field rights so that they can be easily combined.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string |
Overrides
Remarks
Usually obtained from the SuperOffice.CRM.Security.RightsFactory rather than created directly by the client.
Operators
operator &(FieldRight, FieldRight)
Wraps the field right together with an explanatory reason. Also adds logical operators to the field rights so that they can be easily combined.
Declaration
public static FieldRight operator &(FieldRight f1, FieldRight f2)
Parameters
Type | Name | Description |
---|---|---|
FieldRight | f1 | |
FieldRight | f2 |
Returns
Type | Description |
---|---|
FieldRight |
Remarks
Usually obtained from the SuperOffice.CRM.Security.RightsFactory rather than created directly by the client.
operator |(FieldRight, FieldRight)
Wraps the field right together with an explanatory reason. Also adds logical operators to the field rights so that they can be easily combined.
Declaration
public static FieldRight operator |(FieldRight f1, FieldRight f2)
Parameters
Type | Name | Description |
---|---|---|
FieldRight | f1 | |
FieldRight | f2 |
Returns
Type | Description |
---|---|
FieldRight |
Remarks
Usually obtained from the SuperOffice.CRM.Security.RightsFactory rather than created directly by the client.