Show / Hide Table of Contents

Class FunctionRightCache

Inheritance
object
CacheBaseV2
FunctionRightCache
Inherited Members
CacheBaseV2.IsCacheInvalidatedAsync(string, int, PrivateSave, CancellationToken)
CacheBaseV2.InstanceDispose()
CacheBaseV2.BeginDisableAutoUpdate()
CacheBaseV2.LoadAsync(CancellationToken)
CacheBaseV2.Load()
CacheBaseV2.Disposed
object.ToString()
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
[CacheV2(0)]
public class FunctionRightCache : CacheBaseV2

Constructors

FunctionRightCache()

Declaration
public FunctionRightCache()

Properties

TableNames

Gets the names of the table data that are cached in this cache. When these tables are updated the cache will be disposed so a new cache instance can take its place.

Declaration
protected override IEnumerable<string> TableNames { get; }
Property Value
Type Description
IEnumerable<string>
Overrides
CacheBaseV2.TableNames

Methods

GetFunctionRightNameById(int)

Get the functional right identified by the primary key.

Declaration
public string GetFunctionRightNameById(int functionRightId)
Parameters
Type Name Description
int functionRightId
Returns
Type Description
string

The function right name if found; null if it does not exist.

GetFunctionRights()

Get the functional rights for the currently logged on user.

Declaration
public string[] GetFunctionRights()
Returns
Type Description
string[]

Array with the list of the names for all the rights.

GetFunctionRights(int)

Get the functional rights for the role.

Declaration
public string[] GetFunctionRights(int roleId)
Parameters
Type Name Description
int roleId

Id of the role.

Returns
Type Description
string[]

Array with the list of the names for all the rights.

GetRoleType(int)

Return the role type based on the role id. Role Type maps to UserType.

Declaration
public RoleType GetRoleType(int roleId)
Parameters
Type Name Description
int roleId

primary key

Returns
Type Description
RoleType

Assoc/ System / Anon / Extern

HasFunctionRight(string)

Check if the logged on user has the given right.

Declaration
public bool HasFunctionRight(string functionRight)
Parameters
Type Name Description
string functionRight

Name of the right like 'admin-all'.

Returns
Type Description
bool

True if the logged on user has the functional right.

HasFunctionRight(string, int)

Does the given role have the given right

Declaration
public bool HasFunctionRight(string functionRight, int roleId)
Parameters
Type Name Description
string functionRight

Name of the right like 'amin-all'.

int roleId

Id of the role.

Returns
Type Description
bool

True if the role has the functional right.

OnLoad()

Actual cache loading method, to be implemented by derived class. Sentry is Ignored when this method is called

Declaration
protected override void OnLoad()
Overrides
CacheBaseV2.OnLoad()

OnLoadAsync(CancellationToken)

Actual cache loading method, to be implemented by derived class. Sentry is Ignored when this method is called

Declaration
[CreateSyncVersion(OmitNullableDirective = true)]
protected override Task OnLoadAsync(CancellationToken cancellationToken)
Parameters
Type Name Description
CancellationToken cancellationToken
Returns
Type Description
Task
Overrides
CacheBaseV2.OnLoadAsync(CancellationToken)

ShouldReporterBeHidden()

We may want to hide the existence of Reporter, for various reasons

Declaration
public static bool ShouldReporterBeHidden()
Returns
Type Description
bool

Extension Methods

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