Show / Hide Table of Contents

Class SelectionSentry

SelectionSentry guards Selection entities and their component rows. The SelectionSentry applies to the following classes: Selection, SelectionRow, TextRow, SelectionMemberRow

Inheritance
object
Sentry
Sentry<SelectionTableInfo>
RoleRightsSentry<SelectionTableInfo>
SelectionSentry
Implements
ICloneable
Inherited Members
RoleRightsSentry<SelectionTableInfo>.RoleTableRights
RoleRightsSentry<SelectionTableInfo>.VisibleForRights
Sentry<SelectionTableInfo>.GetInterestingFieldsInTable(TableInfo)
Sentry<SelectionTableInfo>.InterestedInAnyInstanceOf<T>()
Sentry<SelectionTableInfo>.ComputeDerivedTableRights()
Sentry<SelectionTableInfo>.SuperComputeDerivedTableRights()
Sentry<SelectionTableInfo>.ComputeDerivedTableRight(TableRight)
Sentry<SelectionTableInfo>.SuperComputeTableRights()
Sentry<SelectionTableInfo>.AddInterestingTables(params TableInfo[])
Sentry<SelectionTableInfo>.ComputeLicenseExpiration()
Sentry<SelectionTableInfo>.SuperComputeFieldRights()
Sentry<SelectionTableInfo>.CanCoverTable(TableInfo)
Sentry<SelectionTableInfo>.IsTableCovered(TableInfo)
Sentry<SelectionTableInfo>.SetAllTableRights(ETableRight, string)
Sentry<SelectionTableInfo>.GetOwnerFieldRight()
Sentry<SelectionTableInfo>.AnalyzeQuery(PrivateSelect)
Sentry<SelectionTableInfo>.ToString()
Sentry<SelectionTableInfo>.InterestingFields
Sentry<SelectionTableInfo>.SentryQueryInfo
Sentry.kTableRights
Sentry.kFieldRights
Sentry._tableRights
Sentry._fieldRights
Sentry._lookups
Sentry.DemandPlugins()
Sentry.CreateSentry(TableInfo)
Sentry.CreateSentries(Select)
Sentry.BeginIgnoreSentry()
Sentry.BeginIgnoreRowSentry()
Sentry.IgnoreRowSentry()
Sentry.IgnoreSentry()
Sentry.IterateLookups(LookupCollection)
Sentry.GetIntField(params FieldInfo[])
Sentry.GetPersistedIntField(params FieldInfo[])
Sentry.GetIsGhostField(FieldInfo)
Sentry.GetDateTimeField(FieldInfo)
Sentry.GetStringField(FieldInfo)
Sentry.ClearRights()
Sentry.GetRecordOwnershipIndex()
Sentry.GetRecordOwnershipIndex(int, int)
Sentry.MapTableToFieldRights(TableInfo, TableRight, FieldInfo[])
Sentry.MakeFieldFromTableRight(TableRight)
Sentry.MakeFieldFromTableRight(TableRight, ETableRight)
Sentry.MakeFieldFromTableRight(ETableRight)
Sentry.GetTableRight(TableInfo)
Sentry.GetFieldRight(FieldInfo)
Sentry.CanTableDo(TableInfo, ETableRight, bool)
Sentry.CanFieldDo(FieldInfo, EFieldRight, bool)
Sentry.IsFieldCovered(FieldInfo)
Sentry.GetGroupFromAssociate(int)
Sentry.IsContactDatabaseOwner(int)
Sentry.IsContactEmployeeUserOwner(int)
Sentry.IsContactSatelliteOwner(int)
Sentry.IsContactLicenseOwner(int)
Sentry.IsContactCurrentDatabaseOwner(int)
Sentry.IsPersonAssociate(int, bool)
Sentry.IsAssociatesOwnerContact(int, int)
Sentry.Lookups
Sentry.Parent
Sentry.Registered
Sentry.RegisteredAssociateId
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
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.

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.

Properties

AssociateId

Selection's associate id

Declaration
public override int AssociateId { get; }
Property Value
Type Description
int
Overrides
Sentry.AssociateId
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.

GroupId

Selection's Group id

Declaration
public override int GroupId { get; }
Property Value
Type Description
int
Overrides
Sentry.GroupId
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.

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
bool
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
bool
Overrides
Sentry.IsGhostRow
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.

IsNew

Is the row saved to teh database (persisted primary key == 0)

Declaration
public override bool IsNew { get; }
Property Value
Type Description
bool
Overrides
Sentry.IsNew
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.

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.

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
Sentry.RegisteredAssociateIdField
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.

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
Sentry.RegisteredField
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.

RowId

Should return a Selection.Selection_id

Declaration
public override int RowId { get; }
Property Value
Type Description
int
Overrides
Sentry.RowId
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.

Visibility

Selection's Visibility flag

Declaration
public int Visibility { get; }
Property Value
Type Description
int
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.

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
Sentry<SelectionTableInfo>.ComputeFieldRights()
Remarks

In SIX.win, this is GUI logic in GUI/SelectionCardView, ::HandleEnableDisableEdit, line 195...

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
Sentry<SelectionTableInfo>.ComputeTableRights()
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.

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
RoleRightsSentry<SelectionTableInfo>.GetMainRight()
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.

GetRowSentry()

Create a copy of the Sentry holding the right instances of table and field infos.

Declaration
public override Sentry GetRowSentry()
Returns
Type Description
Sentry

New instance of the Sentry.

Overrides
Sentry.GetRowSentry()
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.

Implements

ICloneable

Extension Methods

EnumUtil.MapEnums<From, To>(From)
Converters.MapEnums<From, To>(From)
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top