Roles are used to grant users permission to do and see things in the system. In our implementation, a user can only be added to a single role. When testing, it may be useful to create users of different roles to see how different users would view the application.
Information of Note:
- The "RoleMapping" model represents a foreign key relation, linking the id of a principal to the id of a role
Steps to Map a new User to a Role:
- Create a User
- Upon successful creation, the response should indicate the users id.
- Upon successful creation, the response should indicate the users id.
- Create / Find a Role
- Create
- Upon successful creation, the response should indicate the role id.
- Upon successful creation, the response should indicate the role id.
- Find
- List all the Roles (GET /Roles)
- Note the id of the role you will be assigning
- List all the Roles (GET /Roles)
- Create
- Map the user to the Role.
- Create the RoleMapping
- principalType is "USER" which is case-sensitive
- the principalId is the user id from step 1
- the roleId is the role id from step 2
- Create the RoleMapping
- Success
- Response will show the provided information with an id for the mapping
Related articles
Attachments:




