Interface ISecuredRepository
Interface defines the functionality of a secured data repository.
Inherited Members
Namespace: Cireson.Core.Interfaces.DataAccess
Assembly: Cireson.Core.Interfaces.dll
Syntax
public interface ISecuredRepository : IRepository
Remarks
Admin, 8/24/2017.
Methods
View SourceApplySecurityDescriptors<TEntity>(IQueryable<TEntity>)
Applies a security descriptor to the specified elements of the repository.
Declaration
IQueryable<TEntity> ApplySecurityDescriptors<TEntity>(IQueryable<TEntity> query)
where TEntity : class, IPlatformEntity
Parameters
Type | Name | Description |
---|---|---|
IQueryable<TEntity> | query | The queryable entity to apply security to. |
Returns
Type | Description |
---|---|
IQueryable<TEntity> | Returns the queryable entity that security descriptors have been applied to. |
Type Parameters
Name | Description |
---|---|
TEntity | The type of the entity to be processed. |
CheckAllAddsAllowed(IList<IPlatformEntity>)
Determines if entities in the context that have been added, have permission for the add action within the repository.
Declaration
bool CheckAllAddsAllowed(IList<IPlatformEntity> entitiesToBeAdded)
Parameters
Type | Name | Description |
---|---|---|
IList<IPlatformEntity> | entitiesToBeAdded | The list of entities in the repository that have been added. |
Returns
Type | Description |
---|---|
System.Boolean | Returns true if we have add permission, else false if not. |
CheckAllDeletesAllowed(IList<IPlatformEntity>)
Determines if entities in the context that have been deleted, have permission for the deletion action within the repository.
Declaration
bool CheckAllDeletesAllowed(IList<IPlatformEntity> entitiesToDeleted)
Parameters
Type | Name | Description |
---|---|---|
IList<IPlatformEntity> | entitiesToDeleted | The list of entities in the repository that have been deleted. |
Returns
Type | Description |
---|---|
System.Boolean | Returns true if we have delete permission, else false if not. |
CheckAllWriteDeleteAccess()
Determines if entities in the context that have been written to, or deleted have permission for those actions within the repository.
Declaration
bool CheckAllWriteDeleteAccess()
Returns
Type | Description |
---|---|
System.Boolean | Returns true if we have write and delete access, else false if not. |
CheckAllWritesAllowed(IList<IPlatformEntity>)
Determines if entities in the context that have been written to, have permission for those actions within the repository.
Declaration
bool CheckAllWritesAllowed(IList<IPlatformEntity> entitiesToBeWrittenTo)
Parameters
Type | Name | Description |
---|---|---|
IList<IPlatformEntity> | entitiesToBeWrittenTo | The list of entities in the repository that have been written to. |
Returns
Type | Description |
---|---|
System.Boolean | Returns true if we have write permission, else false if not. |
GetAllAddedEntities()
Fetches a list of all entities that have been added to the repository.
Declaration
IList<IPlatformEntity> GetAllAddedEntities()
Returns
Type | Description |
---|---|
IList<IPlatformEntity> | Returns a list of added entities. |