Package com.sap.cds.services.utils.model
Class Privilege
java.lang.Object
com.sap.cds.services.utils.model.Privilege
A
Privilege
specifies access rules for operations.
A Where clause can used to define instance-based access.
grant: one or more operations (as a string or an array of strings)
to: (optional) one or more user roles the privilege is granted to
where: (optional) a condition that further restricts access
example:
{ grant: ['READ','WRITE'], to: 'admin' }
{ grant: 'READ', where: 'buyer = $user' }-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
static enum
Predefined roles that are handled specifically -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetRoles()
static boolean
void
setCxnWhereCondition
(String cxnWhereCondition) void
setWhereCondition
(String whereCondition)
-
Constructor Details
-
Privilege
public Privilege()
-
-
Method Details
-
getGrants
-
addGrant
-
addGrant
-
getRoles
-
addRole
-
addRole
-
getWhereCondition
-
setWhereCondition
-
getCxnWhereCondition
-
setCxnWhereCondition
-
is
-