Skip to main content

newRole

Overview

Creates a new role object and returns its JSON representation. This is typically used as a template for creating or editing roles before saving.

Parameters

ParameterTypeNullableDescription
None--This method does not take any parameters.

Returns

JSON representation of a new RoleDTO object.

Example

role = system.mes.role.newRole()
role["security_levels"] = ["Authenticated/Roles/Administrator"]
role["permissions"] = ["MATERIALS.WRITE" , "INVENTORY.READ"]
role["role_requirement_type"] = "ALL_OF"