Class ProjectSentry
ProjectSentry guards Project entities and their component rows. The ProjectSentry applies to the following classes: Project, ProjectRow, ProjectMemberRow, PhoneRow, EmailRow, UrlRow, TextRow, UdefLarge and UdefSmall
Implements
Inherited Members
Namespace: SuperOffice.CRM.Security
Assembly: SoDataBase.dll
Syntax
public class ProjectSentry : RoleRightsSentry<ProjectTableInfo>, ICloneable
Remarks
The Project row automatically creates a sentry, because Project 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 asks the Project sentry about its permissions.
The Project sentry also answers questions about project-members. A users access to Project Members is controlled by the user's relationship to the owner of the project. The members inherit the project's associate+group values.Examples
ProjectRow p = new ProjectRow.IdxProjectId(1234); TextRow t = new TextRow.IdxTextId( p.TextId ); t.Sentries.Add( p.Sentries );
Constructors
ProjectSentry(ProjectTableInfo)
Create a Project sentry.
Declaration
public ProjectSentry(ProjectTableInfo projectTableInfo)
Parameters
Type | Name | Description |
---|---|---|
ProjectTableInfo | projectTableInfo |
Remarks
The Project row automatically creates a sentry, because Project 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 asks the Project sentry about its permissions.
The Project sentry also answers questions about project-members. A users access to Project Members is controlled by the user's relationship to the owner of the project. The members inherit the project's associate+group values.Examples
ProjectRow p = new ProjectRow.IdxProjectId(1234); TextRow t = new TextRow.IdxTextId( p.TextId ); t.Sentries.Add( p.Sentries );
ProjectSentry(ProjectTableInfo, ProjectMemberTableInfo)
ProjectSentry guards Project entities and their component rows. The ProjectSentry applies to the following classes: Project, ProjectRow, ProjectMemberRow, PhoneRow, EmailRow, UrlRow, TextRow, UdefLarge and UdefSmall
Declaration
public ProjectSentry(ProjectTableInfo projectTableInfo, ProjectMemberTableInfo projectMemberTableInfo)
Parameters
Type | Name | Description |
---|---|---|
ProjectTableInfo | projectTableInfo | |
ProjectMemberTableInfo | projectMemberTableInfo |
Remarks
The Project row automatically creates a sentry, because Project 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 asks the Project sentry about its permissions.
The Project sentry also answers questions about project-members. A users access to Project Members is controlled by the user's relationship to the owner of the project. The members inherit the project's associate+group values.Examples
ProjectRow p = new ProjectRow.IdxProjectId(1234); TextRow t = new TextRow.IdxTextId( p.TextId ); t.Sentries.Add( p.Sentries );
ProjectSentry(ProjectTableInfo, ISoDataLookup)
Create a Project sentry for a particular Project row. The row's associate_id will control the user's permissions with respect to this row.
Declaration
public ProjectSentry(ProjectTableInfo projectTableInfo, ISoDataLookup lookup)
Parameters
Type | Name | Description |
---|---|---|
ProjectTableInfo | projectTableInfo | |
ISoDataLookup | lookup |
Remarks
The Project row automatically creates a sentry, because Project 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 asks the Project sentry about its permissions.
The Project sentry also answers questions about project-members. A users access to Project Members is controlled by the user's relationship to the owner of the project. The members inherit the project's associate+group values.Examples
ProjectRow p = new ProjectRow.IdxProjectId(1234); TextRow t = new TextRow.IdxTextId( p.TextId ); t.Sentries.Add( p.Sentries );
Properties
AssociateId
Project.associate id. Returns the current user's associate-id if not set in the record.
Declaration
public override int AssociateId { get; }
Property Value
Type | Description |
---|---|
Int32 |
Overrides
Remarks
The Project row automatically creates a sentry, because Project 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 asks the Project sentry about its permissions.
The Project sentry also answers questions about project-members. A users access to Project Members is controlled by the user's relationship to the owner of the project. The members inherit the project's associate+group values.Examples
ProjectRow p = new ProjectRow.IdxProjectId(1234); TextRow t = new TextRow.IdxTextId( p.TextId ); t.Sentries.Add( p.Sentries );
GroupId
Project.group id -- the primary group of the AssociateId at the time the associate was set. Returns the associate's primary group id if not set in the record.
Declaration
public override int GroupId { get; }
Property Value
Type | Description |
---|---|
Int32 |
Overrides
Remarks
The Project row automatically creates a sentry, because Project 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 asks the Project sentry about its permissions.
The Project sentry also answers questions about project-members. A users access to Project Members is controlled by the user's relationship to the owner of the project. The members inherit the project's associate+group values.Examples
ProjectRow p = new ProjectRow.IdxProjectId(1234); TextRow t = new TextRow.IdxTextId( p.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 Project row automatically creates a sentry, because Project 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 asks the Project sentry about its permissions.
The Project sentry also answers questions about project-members. A users access to Project Members is controlled by the user's relationship to the owner of the project. The members inherit the project's associate+group values.Examples
ProjectRow p = new ProjectRow.IdxProjectId(1234); TextRow t = new TextRow.IdxTextId( p.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 Project row automatically creates a sentry, because Project 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 asks the Project sentry about its permissions.
The Project sentry also answers questions about project-members. A users access to Project Members is controlled by the user's relationship to the owner of the project. The members inherit the project's associate+group values.Examples
ProjectRow p = new ProjectRow.IdxProjectId(1234); TextRow t = new TextRow.IdxTextId( p.TextId ); t.Sentries.Add( p.Sentries );
MainTable
Return Project table info.
Declaration
protected ProjectTableInfo MainTable { get; }
Property Value
Type | Description |
---|---|
ProjectTableInfo |
Remarks
The Project row automatically creates a sentry, because Project 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 asks the Project sentry about its permissions.
The Project sentry also answers questions about project-members. A users access to Project Members is controlled by the user's relationship to the owner of the project. The members inherit the project's associate+group values.Examples
ProjectRow p = new ProjectRow.IdxProjectId(1234); TextRow t = new TextRow.IdxTextId( p.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 Project row automatically creates a sentry, because Project 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 asks the Project sentry about its permissions.
The Project sentry also answers questions about project-members. A users access to Project Members is controlled by the user's relationship to the owner of the project. The members inherit the project's associate+group values.Examples
ProjectRow p = new ProjectRow.IdxProjectId(1234); TextRow t = new TextRow.IdxTextId( p.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 Project row automatically creates a sentry, because Project 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 asks the Project sentry about its permissions.
The Project sentry also answers questions about project-members. A users access to Project Members is controlled by the user's relationship to the owner of the project. The members inherit the project's associate+group values.Examples
ProjectRow p = new ProjectRow.IdxProjectId(1234); TextRow t = new TextRow.IdxTextId( p.TextId ); t.Sentries.Add( p.Sentries );
RowId
Should return a Project.Project_id
Declaration
public override int RowId { get; }
Property Value
Type | Description |
---|---|
Int32 |
Overrides
Remarks
The Project row automatically creates a sentry, because Project 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 asks the Project sentry about its permissions.
The Project sentry also answers questions about project-members. A users access to Project Members is controlled by the user's relationship to the owner of the project. The members inherit the project's associate+group values.Examples
ProjectRow p = new ProjectRow.IdxProjectId(1234); TextRow t = new TextRow.IdxTextId( p.TextId ); t.Sentries.Add( p.Sentries );
Methods
ComputeDerivedTableRights()
ProjectSentry guards Project entities and their component rows. The ProjectSentry applies to the following classes: Project, ProjectRow, ProjectMemberRow, PhoneRow, EmailRow, UrlRow, TextRow, UdefLarge and UdefSmall
Declaration
protected override void ComputeDerivedTableRights()
Overrides
Remarks
The Project row automatically creates a sentry, because Project 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 asks the Project sentry about its permissions.
The Project sentry also answers questions about project-members. A users access to Project Members is controlled by the user's relationship to the owner of the project. The members inherit the project's associate+group values.Examples
ProjectRow p = new ProjectRow.IdxProjectId(1234); TextRow t = new TextRow.IdxTextId( p.TextId ); t.Sentries.Add( p.Sentries );
ComputeFieldRights()
ProjectSentry guards Project entities and their component rows. The ProjectSentry applies to the following classes: Project, ProjectRow, ProjectMemberRow, PhoneRow, EmailRow, UrlRow, TextRow, UdefLarge and UdefSmall
Declaration
protected override void ComputeFieldRights()
Overrides
Remarks
The Project row automatically creates a sentry, because Project 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 asks the Project sentry about its permissions.
The Project sentry also answers questions about project-members. A users access to Project Members is controlled by the user's relationship to the owner of the project. The members inherit the project's associate+group values.Examples
ProjectRow p = new ProjectRow.IdxProjectId(1234); TextRow t = new TextRow.IdxTextId( p.TextId ); t.Sentries.Add( p.Sentries );
ComputeTableRights()
Computes table rights for Project tables.
Declaration
protected override void ComputeTableRights()
Overrides
Remarks
The Project row automatically creates a sentry, because Project 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 asks the Project sentry about its permissions.
The Project sentry also answers questions about project-members. A users access to Project Members is controlled by the user's relationship to the owner of the project. The members inherit the project's associate+group values.Examples
ProjectRow p = new ProjectRow.IdxProjectId(1234); TextRow t = new TextRow.IdxTextId( p.TextId ); t.Sentries.Add( p.Sentries );
GetRecordOwnershipIndex()
Permit updates to someone else regardless of permissions for the other party.
Declaration
public override EOwnershipIndex GetRecordOwnershipIndex()
Returns
Type | Description |
---|---|
EOwnershipIndex | Minimum ownership index taking persisted AssociateId into account. |
Overrides
Remarks
The Project row automatically creates a sentry, because Project 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 asks the Project sentry about its permissions.
The Project sentry also answers questions about project-members. A users access to Project Members is controlled by the user's relationship to the owner of the project. The members inherit the project's associate+group values.Examples
ProjectRow p = new ProjectRow.IdxProjectId(1234); TextRow t = new TextRow.IdxTextId( p.TextId ); t.Sentries.Add( p.Sentries );
GetRowSentry()
ProjectSentry guards Project entities and their component rows. The ProjectSentry applies to the following classes: Project, ProjectRow, ProjectMemberRow, PhoneRow, EmailRow, UrlRow, TextRow, UdefLarge and UdefSmall
Declaration
public override Sentry GetRowSentry()
Returns
Type | Description |
---|---|
Sentry |
Overrides
Remarks
The Project row automatically creates a sentry, because Project 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 asks the Project sentry about its permissions.
The Project sentry also answers questions about project-members. A users access to Project Members is controlled by the user's relationship to the owner of the project. The members inherit the project's associate+group values.Examples
ProjectRow p = new ProjectRow.IdxProjectId(1234); TextRow t = new TextRow.IdxTextId( p.TextId ); t.Sentries.Add( p.Sentries );
GetTableInfoFromQuery<TargetTableInfo>()
Get tables of the given type from our query
Declaration
protected List<TargetTableInfo> GetTableInfoFromQuery<TargetTableInfo>()
where TargetTableInfo : TableInfo
Returns
Type | Description |
---|---|
List<TargetTableInfo> | List of tableinfos of the given type, from the query |
Type Parameters
Name | Description |
---|---|
TargetTableInfo | Type of table to look for |
Remarks
The Project row automatically creates a sentry, because Project 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 asks the Project sentry about its permissions.
The Project sentry also answers questions about project-members. A users access to Project Members is controlled by the user's relationship to the owner of the project. The members inherit the project's associate+group values.Examples
ProjectRow p = new ProjectRow.IdxProjectId(1234); TextRow t = new TextRow.IdxTextId( p.TextId ); t.Sentries.Add( p.Sentries );