420: Basic Rights and Roles API

Test Case #:420

 

Test Case Name: Basic Rights and Roles API

System: OpenLMIS

Subsystem: requisition

Test case designed by: Anna Czyrko

Design Date:11.05.2016

Short description:  API to define Rights and Roles for Users.

                                                                                                                                                   

Pre – conditions:

                                                                                                                                                                                                                                                       

 

 

Step

Action

Expected system response

Comment

1

                           Create Right entity.                               
In Url:
Method: Post
Example Body:
{
"id": "
"
"name": "test",
"rightType": "test"
}
                                                                                                            

  Status: 201 created,

                    

right id: "
   
                                                 

2

Edit Right entity.
In Url:
Method: Post
Example Body:
{
"id": "bb1ea565-963c-4810-884c-9ba9857ddfc9",
"name": "test123",
"rightType": "test123"
}

Status: 201 created,

right id: "

"

 

3

Create Role entity.
I Right: "
"
II Right: "
"
In Url:
Method: Post
Example Body:
{
"name":"test",
b696f00ee7c5"]}
}
status: 201 created,

 

4

Edit Role entity.
In Url:
Method: Post
Example Body:
{
"id":"d764cd32-5ac0-4d26-b2ef-b86bf8d603c7",
"name":"test123",
9ba9857ddfc9"]}
}

Status: 201 created,

 

5

Create User entity.
In Url:
Method: Post
Example Body:
{ "username":"Anna",
"password": "pass",
"firstName":"Anna",
"lastName":"Boleyn",
"roles":["
b86bf8d603c7
"]}
Status: 201 created,
user id: "
"
 

6

Edit User entity.
In Url:
Method: Post
Example Body:
{
"id": "
c2418e93-d2ca-4ae9-90e8-b1b25e570f59
",
"username":"Karolina",
"password": "pass",
"firstName":"Anna",
"lastName":"Boleyn",
"roles":["
cca0a5dfe280
"]}

Status: 201 created,

 

 

 

Post – conditions:

 

 

OpenLMIS: the global initiative for powerful LMIS software