Class: Security

Security~Security()

Security

Constructor

new Security()

Class that manages a set of conditions
Source:

Methods

addTableOpCondition(tableName, op, condition)

Adds condition for a specified table/operation combination, merging to existent. Every condition
Parameters:
Name Type Description
tableName string
op string
condition ConditionRow
Source:

canPost(r, env)

Parameters:
Name Type Description
r ObjectRow
env Environment
Source:

getConditions(tableName, op, env) → {Array.<ConditionRow>}

Gets security conditions for an operation in the specified environment context. Those are filtered basing on usergrouplist of the environment, that has to include idcustomgroup property value of the ConditionRow. If environment does not contain idcustomgroup field, then all matching table/op conditions are taken
Parameters:
Name Type Description
tableName
op string
env Environment
Source:
Returns:
Type
Array.<ConditionRow>

getTableOpConditions(tableName, op) → {Array.<ConditionRow>}

Get all table/operation conditions for any environment
Parameters:
Name Type Description
tableName string
op string
Source:
Returns:
Type
Array.<ConditionRow>

securityCondition(tableName, opKind, environment) → {sqlFun}

Evaluates the SecurityCondition about a combination of tableName/opKind in the specified environment Requires environment.sys("idcustomgroup") to have been already evaluated
Parameters:
Name Type Description
tableName string
opKind string
environment Environment
Source:
Returns:
Type
sqlFun