Class SelectionSentry
SelectionSentry guards Selection entities and their component rows. The SelectionSentry applies to the following classes: Selection, SelectionRow, TextRow, SelectionMemberRow
Inheritance
Implements
Inherited Members
Namespace: SuperOffice.CRM.Security
Assembly: SoDataBase.dll
Syntax
public class SelectionSentry : RoleRightsSentry<SelectionTableInfo>, ICloneable
Remarks
The Selection row automatically creates a sentry, because Selection is also an RDB Entity. The text row does not create a sentry because it does not know which entity it belongs to, so we have to give it a sentry to use. The text row will ask the Selection sentry about its permissions.
Examples
SelectionRow p = new SelectionRow.IdxSelectionId(1234); TextRow t = new TextRow.IdxTextId( c.TextId ); t.Sentries.Add( p.Sentries );
Constructors
SelectionSentry(SelectionTableInfo)
Create a Selection sentry.
Declaration
public SelectionSentry(SelectionTableInfo selectionTableInfo)
Parameters
Type | Name | Description |
---|---|---|
SelectionTableInfo | selectionTableInfo |
Remarks
The Selection row automatically creates a sentry, because Selection is also an RDB Entity. The text row does not create a sentry because it does not know which entity it belongs to, so we have to give it a sentry to use. The text row will ask the Selection sentry about its permissions.
Examples
SelectionRow p = new SelectionRow.IdxSelectionId(1234); TextRow t = new TextRow.IdxTextId( c.TextId ); t.Sentries.Add( p.Sentries );
SelectionSentry(SelectionTableInfo, ISoDataLookup)
Create a Selection sentry for a particular Selection row. The row's associate_id will control the user's permissions with respect to this row.
Declaration
public SelectionSentry(SelectionTableInfo selectionTableInfo, ISoDataLookup lookup)
Parameters
Type | Name | Description |
---|---|---|
SelectionTableInfo | selectionTableInfo | |
ISoDataLookup | lookup |
Remarks
The Selection row automatically creates a sentry, because Selection is also an RDB Entity. The text row does not create a sentry because it does not know which entity it belongs to, so we have to give it a sentry to use. The text row will ask the Selection sentry about its permissions.
Examples
SelectionRow p = new SelectionRow.IdxSelectionId(1234); TextRow t = new TextRow.IdxTextId( c.TextId ); t.Sentries.Add( p.Sentries );
Properties
AssociateId
Selection's associate id
Declaration
public override int AssociateId { get; }
Property Value
Type | Description |
---|---|
Int32 |
Overrides
Remarks
The Selection row automatically creates a sentry, because Selection is also an RDB Entity. The text row does not create a sentry because it does not know which entity it belongs to, so we have to give it a sentry to use. The text row will ask the Selection sentry about its permissions.
Examples
SelectionRow p = new SelectionRow.IdxSelectionId(1234); TextRow t = new TextRow.IdxTextId( c.TextId ); t.Sentries.Add( p.Sentries );
GroupId
Selection's Group id
Declaration
public override int GroupId { get; }
Property Value
Type | Description |
---|---|
Int32 |
Overrides
Remarks
The Selection row automatically creates a sentry, because Selection is also an RDB Entity. The text row does not create a sentry because it does not know which entity it belongs to, so we have to give it a sentry to use. The text row will ask the Selection sentry about its permissions.
Examples
SelectionRow p = new SelectionRow.IdxSelectionId(1234); TextRow t = new TextRow.IdxTextId( c.TextId ); t.Sentries.Add( p.Sentries );
IsFindOrDashboardSelection
SelectionSentry guards Selection entities and their component rows. The SelectionSentry applies to the following classes: Selection, SelectionRow, TextRow, SelectionMemberRow
Declaration
public bool IsFindOrDashboardSelection { get; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
The Selection row automatically creates a sentry, because Selection is also an RDB Entity. The text row does not create a sentry because it does not know which entity it belongs to, so we have to give it a sentry to use. The text row will ask the Selection sentry about its permissions.
Examples
SelectionRow p = new SelectionRow.IdxSelectionId(1234); TextRow t = new TextRow.IdxTextId( c.TextId ); t.Sentries.Add( p.Sentries );
IsGhostRow
Returns whether the primary key is a ghost field (i.e., we're looking at a nonexistent record, as opposed to just looking at a new one)
Declaration
public override bool IsGhostRow { get; }
Property Value
Type | Description |
---|---|
Boolean |
Overrides
Remarks
The Selection row automatically creates a sentry, because Selection is also an RDB Entity. The text row does not create a sentry because it does not know which entity it belongs to, so we have to give it a sentry to use. The text row will ask the Selection sentry about its permissions.
Examples
SelectionRow p = new SelectionRow.IdxSelectionId(1234); TextRow t = new TextRow.IdxTextId( c.TextId ); t.Sentries.Add( p.Sentries );
IsNew
Is the row saved to teh database (persisted primary key == 0)
Declaration
public override bool IsNew { get; }
Property Value
Type | Description |
---|---|
Boolean |
Overrides
Remarks
The Selection row automatically creates a sentry, because Selection is also an RDB Entity. The text row does not create a sentry because it does not know which entity it belongs to, so we have to give it a sentry to use. The text row will ask the Selection sentry about its permissions.
Examples
SelectionRow p = new SelectionRow.IdxSelectionId(1234); TextRow t = new TextRow.IdxTextId( c.TextId ); t.Sentries.Add( p.Sentries );
MainTable
Return Selection table info.
Declaration
protected SelectionTableInfo MainTable { get; }
Property Value
Type | Description |
---|---|
SelectionTableInfo |
Remarks
The Selection row automatically creates a sentry, because Selection is also an RDB Entity. The text row does not create a sentry because it does not know which entity it belongs to, so we have to give it a sentry to use. The text row will ask the Selection sentry about its permissions.
Examples
SelectionRow p = new SelectionRow.IdxSelectionId(1234); TextRow t = new TextRow.IdxTextId( c.TextId ); t.Sentries.Add( p.Sentries );
RegisteredAssociateIdField
The field that holds the associate id of the user first creating the item.
Declaration
public override FieldInfo RegisteredAssociateIdField { get; }
Property Value
Type | Description |
---|---|
FieldInfo |
Overrides
Remarks
The Selection row automatically creates a sentry, because Selection is also an RDB Entity. The text row does not create a sentry because it does not know which entity it belongs to, so we have to give it a sentry to use. The text row will ask the Selection sentry about its permissions.
Examples
SelectionRow p = new SelectionRow.IdxSelectionId(1234); TextRow t = new TextRow.IdxTextId( c.TextId ); t.Sentries.Add( p.Sentries );
RegisteredField
The field that holds information about when the item was first created.
Declaration
public override FieldInfo RegisteredField { get; }
Property Value
Type | Description |
---|---|
FieldInfo |
Overrides
Remarks
The Selection row automatically creates a sentry, because Selection is also an RDB Entity. The text row does not create a sentry because it does not know which entity it belongs to, so we have to give it a sentry to use. The text row will ask the Selection sentry about its permissions.
Examples
SelectionRow p = new SelectionRow.IdxSelectionId(1234); TextRow t = new TextRow.IdxTextId( c.TextId ); t.Sentries.Add( p.Sentries );
RowId
Should return a Selection.Selection_id
Declaration
public override int RowId { get; }
Property Value
Type | Description |
---|---|
Int32 |
Overrides
Remarks
The Selection row automatically creates a sentry, because Selection is also an RDB Entity. The text row does not create a sentry because it does not know which entity it belongs to, so we have to give it a sentry to use. The text row will ask the Selection sentry about its permissions.
Examples
SelectionRow p = new SelectionRow.IdxSelectionId(1234); TextRow t = new TextRow.IdxTextId( c.TextId ); t.Sentries.Add( p.Sentries );
Visibility
Selection's Visibility flag
Declaration
public int Visibility { get; }
Property Value
Type | Description |
---|---|
Int32 |
Remarks
The Selection row automatically creates a sentry, because Selection is also an RDB Entity. The text row does not create a sentry because it does not know which entity it belongs to, so we have to give it a sentry to use. The text row will ask the Selection sentry about its permissions.
Examples
SelectionRow p = new SelectionRow.IdxSelectionId(1234); TextRow t = new TextRow.IdxTextId( c.TextId ); t.Sentries.Add( p.Sentries );
Methods
ComputeFieldRights()
Disable the selection kind field if it is 'static', since a static selection cannot be converted to a dynamic one
Declaration
protected override void ComputeFieldRights()
Overrides
Remarks
In SIX.win, this is GUI logic in GUI/SelectionCardView, ::HandleEnableDisableEdit, line 195...
Examples
SelectionRow p = new SelectionRow.IdxSelectionId(1234); TextRow t = new TextRow.IdxTextId( c.TextId ); t.Sentries.Add( p.Sentries );
ComputeTableRights()
Computes table rights for Selection tables. Deny delete and update to Selections which belong to other associates. If the current is an user or general admin, full rights are granted.
Declaration
protected override void ComputeTableRights()
Overrides
Remarks
The Selection row automatically creates a sentry, because Selection is also an RDB Entity. The text row does not create a sentry because it does not know which entity it belongs to, so we have to give it a sentry to use. The text row will ask the Selection sentry about its permissions.
Examples
SelectionRow p = new SelectionRow.IdxSelectionId(1234); TextRow t = new TextRow.IdxTextId( c.TextId ); t.Sentries.Add( p.Sentries );
GetMainRight()
Modify rights so persons that can administer users can see and delete their selections.
Declaration
public override ETableRight GetMainRight()
Returns
Type | Description |
---|---|
ETableRight | Main TableRight for Selection. |
Overrides
Remarks
The Selection row automatically creates a sentry, because Selection is also an RDB Entity. The text row does not create a sentry because it does not know which entity it belongs to, so we have to give it a sentry to use. The text row will ask the Selection sentry about its permissions.
Examples
SelectionRow p = new SelectionRow.IdxSelectionId(1234); TextRow t = new TextRow.IdxTextId( c.TextId ); t.Sentries.Add( p.Sentries );
GetRowSentry()
SelectionSentry guards Selection entities and their component rows. The SelectionSentry applies to the following classes: Selection, SelectionRow, TextRow, SelectionMemberRow
Declaration
public override Sentry GetRowSentry()
Returns
Type | Description |
---|---|
Sentry |
Overrides
Remarks
The Selection row automatically creates a sentry, because Selection is also an RDB Entity. The text row does not create a sentry because it does not know which entity it belongs to, so we have to give it a sentry to use. The text row will ask the Selection sentry about its permissions.
Examples
SelectionRow p = new SelectionRow.IdxSelectionId(1234); TextRow t = new TextRow.IdxTextId( c.TextId ); t.Sentries.Add( p.Sentries );