883: Permission Check Tool
Test Case #:883
| Test Case Name: Permission Check Tool |
System: OpenLMIS | Subsystem: blue |
Test case designed by: Lucyna Kwidzińska | Design Date:22.09.2016 |
Short description: |
|
Pre – conditions: |
|
Step | Action | Expected system response | Comment |
1 | Note: To test this ticket, I created a few rights and roles. Then, I assigned some roles to Users. |
|
|
2 |
Create a few roles and assigne them to user.
User: testowyUser01 "id": "45230742-b0f4-4928-aa91-6517ad81626d",
|
| |
3 | Assign a roles to different program/supervisoryNode. User: example01 "id": "c4e877e5-8093-4d90-a44e-af339a187924", |
| |
4 | Check If user example01 has access to program with code: program02.
URL: OR Method: GET | The server will return 200 OK status and message: true. It is correct.
|
|
5 | Check If user: testowyUser has an access to program with code: program03. URL: OR Method: GET | The server will return 200OK status and message: true. It is correct.
|
|
6 | Check If user: example01 has access to program with code: program03. URL: OR Method: GET | The server will return 200OK status with message: false. The example01 user does not have access to this program. The testowyUser is assigned to it. |
|
7 | Check If user:testowyUser has an access to program with code: program02. OR Method: GET | The server will return 200OK status with message: false. The testowyUser user does not have access to this program. The example01 user is assigned to it.
|
|
8 | Check If user: example01 has assigned role: ORDER FULFILMENT to warehouse: warehouse. URL: Method: GET | The server will return 200OK status and message: true. It is correct. |
|
9 | Check If user: testowyUser has assigned role: ORDER FULFILMENT to warehouse: hospital. URL: Method: GET | The server will return 200OK status and message: true. It is correct.
|
|
10 | Check If user: testowyUser has assigned role: ORDER FULFILMENT to warehouse: warehouse. Method: GET | The server will return 200OK status and message: false. It is correct. For this user, warehouse code is different. |
|
11 | Check If user: example01 has assigned role: ORDER FULFILMENT to warehouse: hospital. URL: Method: GET | The server will return 200OK status and message: false. It is correct. For this user, warehouse code is different.
|
|
12 | Check If user: testowyUser has assigned role: SUPERVISION to program with code program02, supervisoryNode with code supercode. URL: Method: GET | The server will return 200OK status and message: true.
|
|
13 | Check If user: example01 has assigned role: SUPERVISION to program with code program02, supervisoryNode with code supercode. URL: Method: GET | The server will return 200OK status and message: false. User does not have this permission.
|
|
14 | Check If user: testowyUser has assigned role: SUPERVISION to program with code program02, supervisoryNodeCode with code supercode but REQUEST did not contain the supervisoryNodeCode. URL: Method: GET | The server will return 200OK status and message: false. The supervisoryNodeCode should be added to the request. |
|
15 | Check If user: testowyUser has assigned role: ADMIN_GENERAL. URL: Method: GET | The server will return 200OK status and message: true. |
|
16 | Check If user: example01 has assigned role: ADMIN_GENERAL. URL: Method: GET | The server will return 200OK status and message: false. User does not have this permission.
|
|
17 | Check If user: testowyUser has assigned role: REPORTS. URL: Method: GET | The server will return 200OK status and message: false. User does not have this permission. |
|
18 | Check If user: example01 has assigned role: REPORTS. URL: Method: GET | The server will return 200OK status and message: true.
|
|
19 | Check If user: example01 has access to assigned program without programCode in the request. URL: Method: GET | The server will return 200OK status and message: false. The programCode should be added to the request. |
|
20 | Check If user: testowyUser has access to assigned program without programCode in the request. URL: Method: GET | The server will return 200OK status and message: false. The programCode should be added to the request. |
|
18 | Check If user: example 01 has assigned role: ORDER FULFILMENT to warehouse: warehouse without the warehouseCode in request. URL: Method: GET | The server will return 200OK status and message: false. The warehouseCode should be added to the request. |
|
21 | Check If user: testowyUser has assigned role: ORDER FULFILMENT to warehouse: hospital without warehouseCode in the request. URL: Method: GET | The server will return 200OK status and message: false. The warehouseCode should be added to the request. |
|
Post – conditions: |