1401: Cannot assign a role with no rights

1401: Cannot assign a role with no rights

Test Case #:1401

Test Case Name:Cannot assign a role with no rights

System: OpenLMIS

Subsystem: blue

Test case designed by: Paulina Borowa

Design Date:16.12.2016

Short description

If someone will try to assign a role with no rights to a user he/she will get an error message:

{ "timestamp": 1479714389035, "status": 500, "error": "Internal Server Error", "exception": "java.util.NoSuchElementException", "message": "No message available", "path": "/api/users" }

There should more appropriate message like: 'the role <<role_name>> cannot be assigned because it has no rights' or we should handle a situation in which the given role has no rights.

Acceptance:

  • assigning a role to a user when the role has no rights will not result in a 500

  • error message is better

  • demo data has no roles without rights

                                                                                                                                                   

Pre – conditions:

to check this you need to load old demo-data, because after changes there is no possibility to create a role without rights (point 3)                                                                                                                                                                                                                                                  

 

 

Step

Action

Expected system response

Comment

1

Check: demo data has roles without rights

Method GET

                                                                                                                         
  

                                                 

2

Check: 

  • assigning a role to a user when the role has no rights will not result in a 500

  • error message is better

Try to assign it to user:

 

 

3

Currently there is no possibility to create a role without any rights:

 

 

 

OpenLMIS: the global initiative for powerful LMIS software