Class DashboardTileDefinitionSentry
DashboardTileDefinitionSentry guards DashboardTileDefinition entities. It is using datarights and visiblefor to make sure you can only see or modify what you should be able to.
Inheritance
Implements
Inherited Members
Namespace: SuperOffice.CRM.Security
Assembly: SoDataBase.dll
Syntax
public class DashboardTileDefinitionSentry : RoleRightsSentry<DashboardTileDefinitionTableInfo>, ICloneable
Constructors
DashboardTileDefinitionSentry(DashboardTileDefinitionTableInfo)
Create a DashboardTile sentry.
Declaration
public DashboardTileDefinitionSentry(DashboardTileDefinitionTableInfo tableInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| DashboardTileDefinitionTableInfo | tableInfo |
DashboardTileDefinitionSentry(DashboardTileDefinitionTableInfo, ISoDataLookup)
Create a sentry for a particular row. The row's associate_id will control the user's permissions with respect to this row.
Declaration
public DashboardTileDefinitionSentry(DashboardTileDefinitionTableInfo tableInfo, ISoDataLookup lookup)
Parameters
| Type | Name | Description |
|---|---|---|
| DashboardTileDefinitionTableInfo | tableInfo | |
| ISoDataLookup | lookup |
Properties
AssociateId
Returns the associate id based on the row provided to the sentry. This method must be overridden by the sub-class.
Declaration
public override int AssociateId { get; }
Property Value
| Type | Description |
|---|---|
| int |
Overrides
GroupId
Returns the group id of the associate based on the row provided to the sentry. This method must be overridden by the sub-class. If the row does not contain the group id of the associate, then the function must look up the appropriate group id in the associate table.
TODO CM: add multi-db aware caching mechanism for associate->usergroup mapping
Declaration
public override int GroupId { get; }
Property Value
| Type | Description |
|---|---|
| int |
Overrides
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
IsNew
Is the row saved to teh database (persisted primary key == 0)
Declaration
public override bool IsNew { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Overrides
MainTable
Return table info.
Declaration
protected DashboardTileDefinitionTableInfo MainTable { get; }
Property Value
| Type | Description |
|---|---|
| DashboardTileDefinitionTableInfo |
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
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
RowId
Should return a the primary key value
Declaration
public override int RowId { get; }
Property Value
| Type | Description |
|---|---|
| int |
Overrides
Methods
ComputeFieldRights()
DashboardTileDefinitionSentry guards DashboardTileDefinition entities. It is using datarights and visiblefor to make sure you can only see or modify what you should be able to.
Declaration
protected override void ComputeFieldRights()
Overrides
ComputeTableRights()
Computes table rights for tables.
Declaration
protected override void ComputeTableRights()
Overrides
GetMainRight()
Modify rights.
Declaration
public override ETableRight GetMainRight()
Returns
| Type | Description |
|---|---|
| ETableRight | Main TableRight. |
Overrides
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. |