2023-02-20 09:49:05 +05:45
|
|
|
Feature: assign role
|
|
|
|
|
As an admin,
|
|
|
|
|
I want to assign roles to users.
|
|
|
|
|
So that users without an admin role cannot get the list of roles, assignments list and assign roles to users
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Scenario Outline: assign role to the user using graph api
|
|
|
|
|
Given user "Alice" has been created with default attributes and without skeleton files
|
2024-03-19 09:49:58 +05:45
|
|
|
And the administrator has assigned the role "<user-role>" to user "Alice" using the Graph API
|
2023-02-20 09:49:05 +05:45
|
|
|
When the administrator retrieves the assigned role of user "Alice" using the Graph API
|
|
|
|
|
Then the HTTP status code should be "200"
|
2024-03-19 09:49:58 +05:45
|
|
|
And the Graph API response should have the role "<user-role>"
|
2023-02-20 09:49:05 +05:45
|
|
|
Examples:
|
2024-03-19 09:49:58 +05:45
|
|
|
| user-role |
|
2023-02-20 09:49:05 +05:45
|
|
|
| Admin |
|
|
|
|
|
| Space Admin |
|
|
|
|
|
| User |
|
2023-06-06 16:03:43 +02:00
|
|
|
| User Light |
|
2023-02-20 09:49:05 +05:45
|
|
|
|
|
|
|
|
@issue-5032
|
|
|
|
|
Scenario Outline: assign role to the user with graph api and list role with setting api
|
|
|
|
|
Given user "Alice" has been created with default attributes and without skeleton files
|
2024-03-19 09:49:58 +05:45
|
|
|
And the administrator has assigned the role "<user-role>" to user "Alice" using the Graph API
|
2023-02-20 09:49:05 +05:45
|
|
|
When user "Alice" tries to get list of assignment
|
2024-03-19 09:49:58 +05:45
|
|
|
Then the HTTP status code should be "<http-status-code>"
|
|
|
|
|
And the setting API response should have the role "<user-role>"
|
2023-02-20 09:49:05 +05:45
|
|
|
Examples:
|
2024-03-19 09:49:58 +05:45
|
|
|
| user-role | http-status-code |
|
|
|
|
|
| Admin | 201 |
|
|
|
|
|
| Space Admin | 401 |
|
|
|
|
|
| User | 401 |
|
|
|
|
|
| User Light | 401 |
|
2023-03-03 09:17:34 +05:45
|
|
|
|
|
|
|
|
|
|
|
|
|
Scenario Outline: assign role to the user with setting api and list role with graph api
|
|
|
|
|
Given user "Alice" has been created with default attributes and without skeleton files
|
2024-03-19 09:49:58 +05:45
|
|
|
And the administrator has given "Alice" the role "<user-role>" using the settings api
|
2023-03-03 09:17:34 +05:45
|
|
|
When the administrator retrieves the assigned role of user "Alice" using the Graph API
|
|
|
|
|
Then the HTTP status code should be "200"
|
2024-03-19 09:49:58 +05:45
|
|
|
And the Graph API response should have the role "<user-role>"
|
2023-03-03 09:17:34 +05:45
|
|
|
Examples:
|
2024-03-19 09:49:58 +05:45
|
|
|
| user-role |
|
2023-03-03 09:17:34 +05:45
|
|
|
| Admin |
|
|
|
|
|
| Space Admin |
|
|
|
|
|
| User |
|
2023-06-06 16:03:43 +02:00
|
|
|
| User Light |
|