Files
opencloud/tests/acceptance/features/apiGraph/unassignRole.feature
Prarup Gurung 4b04870ade [full-ci] [tests-only] unassign app role assignment of user (#6030)
* Added scenario to unassign the role of user

* Added scenario,admin tries to unassign the own role

* Addressed reviews

* refactor

---------

Co-authored-by: Saw-jan <saw.jan.grg3e@gmail.com>
2023-05-15 10:45:24 +02:00

33 lines
1.4 KiB
Gherkin

@api
Feature: unassign user role
As an admin
I want to unassign the role of user
So that the role of user is set to default
Background:
Given user "Alice" has been created with default attributes and without skeleton files
Scenario Outline: admin user unassigns the role of another user
Given user "Brian" has been created with default attributes and without skeleton files
And the administrator has assigned the role "Admin" to user "Alice" using the Graph API
And the administrator has assigned the role "<role>" to user "Brian" using the Graph API
When user "Alice" unassigns the role of user "Brian" using the Graph API
Then the HTTP status code should be "204"
And user "Brian" should not have any role assigned
When user "Brian" uploads file with content "this step will assign the role to default" to "assign-to-default.txt" using the WebDAV API
And user "Brian" should have the role "User" assigned
Examples:
| role |
| Admin |
| Space Admin |
| User |
| Guest |
@issue-6035
Scenario: admin user tries to unassign his/her own role
Given the administrator has assigned the role "Admin" to user "Alice" using the Graph API
When user "Alice" tries to unassign the role of user "Alice" using the Graph API
Then the HTTP status code should be "403"
And user "Alice" should have the role "Admin" assigned