groupmembership
To support NIM Role models, you must specify a members child object of crud_objects, which in turn should specify a groupmembership child object. As a prerequisite, you must also have separate crud_objects child objects for users and groups in the system, with keys defined.
The groupmembership object has no key. Instead, it references your users and groups objects and has operations to add and remove group memberships.
Example JSON:
"members": { "operations": { "members_get": { . . . }, "member_add": { . . . }, "member_remove": { . . . } }, "groupmembership": { "add_operation": "member_add", "remove_operation": "member_remove", "member_table": "users", "group_table": "groups", "member_attributes": { "id": "id", "fullName": "member_name" }, "group_attributes": { "id": "group_id", "name": "group_name" } }, "resources": { "group_id": "_nim*", "kind": "string", "etag": "etag", "id": "string*", "email": "string*", "role": "string*", "type": "string*", "status": "string*", "delivery_settings": "string*" } },
The groupmembership object contains the following properties:
add_operation
The name of the operation that adds a member to a group. For example, member_add
.
remove_operation
The name of the operation that removes a member from a group. For example, member_remove
.
member_table
The name of the crud_objects child object that contains potential group members. Typically a users
or employees
object.
group_table
The name of the crud_objects child object that contains the system's groups. Typically a groups
object.
member_attributes
An object that contains a single property, id. It is used in add_operation and remove_operation. Its value must be one of the resources of the crud_objects child object which is specified as the member_table. Typically it should be set to the resource specified as that table's key.
group_attributes
An object that contains a single property, id. It is used in the add_operation and remove_operation. Its value must be one of the resources of the crud_objects child object which is specified as the group_table. Typically it should be set to the resource specified as that table's key.