Class FunctionRightCache
Inherited Members
Namespace: SuperOffice.CRM.Security
Assembly: SoDataBase.dll
Syntax
[CacheV2("Database", 0)]
public class FunctionRightCache : CacheBaseV2, IFlushableV2, IDisposable
Constructors
FunctionRightCache()
Declaration
public FunctionRightCache()
Properties
TableNames
Declaration
protected override IEnumerable<string> TableNames { get; }
Property Value
Type | Description |
---|---|
IEnumerable<String> |
Overrides
Methods
GetCurrent()
Declaration
public static FunctionRightCache GetCurrent()
Returns
Type | Description |
---|---|
FunctionRightCache |
GetFunctionRightNameById(Int32)
Get the functional right identified by the primary key.
Declaration
public string GetFunctionRightNameById(int functionRightId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | 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(Int32)
Get the functional rights for the role.
Declaration
public string[] GetFunctionRights(int roleId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | roleId | Id of the role. |
Returns
Type | Description |
---|---|
String[] | Array with the list of the names for all the rights. |
GetRoleType(Int32)
Return the role type based on the role id. Role Type maps to UserType.
Declaration
public RoleType GetRoleType(int roleId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | 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 |
---|---|
Boolean | True if the logged on user has the functional right. |
HasFunctionRight(String, Int32)
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'. |
Int32 | roleId | Id of the role. |
Returns
Type | Description |
---|---|
Boolean | True if the role has the functional right. |
OnLoad()
Declaration
protected override void OnLoad()
Overrides
ShouldReporterBeHidden()
We may want to hide the existence of Reporter, for various reasons
Declaration
public static bool ShouldReporterBeHidden()
Returns
Type | Description |
---|---|
Boolean |