RLS

Methods

# allowForAdminOwnerAndAdmTable (ctxtubMethodParams) static

For members of Admin group and for users root and admin do nothing.

For other users adds condition what

  • either current user is a record owner
  • OR user or one of user role in {$entity}_adm sub-table

Arguments:

# currentUserInGroup (sender, roleName) → * static deprecated

Use functional RLS instead

is current ( Session.userID) user have role with name roleName

Arguments:
  • sender:
  • roleName:

# federalize () static

Dirty hack for federalized entities (for example ubs_numcounter) work without FED model.

FED model define good realization of RLS.federalize - this is only stub

# getDefaultAclRlsSubjects (mixinCfgoptobject) → Array.<number> static

Default behavior for get aclRls subjects - return array of IDs for currently logged in user:

  • if uba_subject in onEntities: userID + user roles IDs + user groups IDs
  • if org_unit in onEntities: orgUnitIDs

Arguments:

# isSuperUserOrInAdminGroup () → boolean static

Returns true in case current user is Superuser ( build-in root or admin) or member of Admin group

# isUserAdminOrInAdminGroup () → boolean static

Returns true in case current user is admin or root or Admin group member. Used as default for aclRls.skipIfFn

# userInAdmSubtable (sender, user) static deprecated

Use functional RLS instead

Check user in adm sub-table. No user group check performed!

Arguments:
  • sender:
  • user:

# userInGroup (usernumber, groupnamestring) → string static deprecated

Use functional RLS instead

todo - OPTIMIZE using role cache

Arguments:

# userOrUserGroupInAdmSubtable (sender, user) static deprecated

Use functional RLS instead

Check user or any of user groups in adm subtable /* xmax using ORACLE _todo check oracle syntax!!

Arguments:
  • sender:
  • user: