Table of Contents

Method Can

Namespace
Innova.Data.Security
Assembly
Innova.Data.dll

Can<T>(IEntitySecurity<T>, Operation, T, object)

Checks if the specified entity security allows the specified operation on the given entity.

public static bool Can<T>(this IEntitySecurity<T> entitySecurity, Operation operation, T entity, object sourceEntity = null) where T : class

Parameters

entitySecurity IEntitySecurity<T>

The entity security instance.

operation Operation

The operation to check.

entity T

The entity to check.

sourceEntity object

The source entity.

Returns

bool

true if the operation is allowed; otherwise, false.

Type Parameters

T

The type of the entity.

Can<T>(IEntitySecurity<T>, Operation, IPrimaryKey)

Checks if the specified entity security allows the specified operation on the entity with the specified primary keys.

public static bool Can<T>(this IEntitySecurity<T> entitySecurity, Operation operation, IPrimaryKey keys) where T : class

Parameters

entitySecurity IEntitySecurity<T>

The entity security instance.

operation Operation

The operation to check.

keys IPrimaryKey

The primary keys of the entity.

Returns

bool

true if the operation is allowed; otherwise, false.

Type Parameters

T

The type of the entity.

Can<T>(IEntitySecurity<T>, Operation)

Checks if the specified entity security allows the specified operation.

public static bool Can<T>(this IEntitySecurity<T> entitySecurity, Operation operation) where T : class

Parameters

entitySecurity IEntitySecurity<T>

The entity security instance.

operation Operation

The operation to check.

Returns

bool

true if the operation is allowed; otherwise, false.

Type Parameters

T

The type of the entity.