Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Step

Action

Expected system response

Comment

1

  Check if administrator has an supervisory right assigned to his program and facility.

     URL:

http://10.222.17.134/referencedata/api/users/a337ec45-31a0-4f2b-9b2e-a105c4b669bb/hasRight?rightId=feb4c0b8-f6d2-4289-b29d-811c1d0b2863&programId=10845cb9-d365-4aaa-badd-b4fa39c6a26a&facilityId=e6799d64-d10d-4011-b8c2-0e4d4a3f65ce&access_token=0eff62d7-85a6-4a3f-8c4a-62466e3d0734

                                                                                                              

       true    

Image Added        

                                                 

2

Check if administrator has an orderfulfillment right assigned.

URL:

http://10.222.17.134/referencedata/api/users/a337ec45-31a0-4f2b-9b2e-a105c4b669bb/hasRight?rightId=

17c3e414b60844adb4859df56a35923d0eff62d7-85a6-4a3f-8c4a-62466e3d0734true

Image Added

The proper role has been crearted.

body:

  {

    "id": "185db8f7-ee35-44d0-8b40-6de12489ae77",

    "name": "Storeroom Manager",

    "rights": [

      {

        "id": "3e181470-ca69-4f26-a8a9-30f947bc0929",

        "name": "OREDR",

        "type": "ORDER_FULFILLMENT",

        "attachments": []

      }

    ]

  },

3

Image Added

false


4

Image Added

false

5

Check if administrator can verify his rights when program is definined in request but facility don't.

URL:

http://10.222.17.134/referencedata/api/users/a337ec45-31a0-4f2b-9b2e-a105c4b669bb/hasRight?rightId=feb4c0b8-f6d2-4289-b29d-811c1d0b2863&programId=10845cb9-d365-4aaa-badd-b4fa39c6a26a&access_token=0eff62d7-85a6-4a3f-8c4a-62466e3d0734

error mesage displayed

Image Added


46

 Check if it possible to check the user rights when parameter rightID is not specified in the request.

URL:

http://10.222.17.134/referencedata/api/users/a337ec45-31a0-4f2b-9b2e-a105c4b669bb/hasRight?access_token=0eff62d7-85a6-4a3f-8c4a-62466e3d0734

no

Image Added


67

false

Image Added

Assign supervision right to devadmin:

{

"id": "56a50e9a-9668-437d-a09c-7e709ce22222",

"username": "devadmin",

"firstName": "Admin",

"lastName": "Admin",

"email": "devadmin@openlmis.org",

"timezone": "CET",

"homeFacility": {

"code": "W01",

"name": "CMST Warehouse",

"geographicZone": {

"code": "Mal-So",

"name": "Southern Region",

"level": {

"code": "Region",

"levelNumber": 2,

"id": "9b497d87-cdd9-400e-bb04-fae0bf6a9491"

},

"id": "0bbd69c1-e20f-48f5-aae4-26dcd8aa7602"

},

"type": {

"code": "WH",

"name": "Warehouse",

"displayOrder": 3,

"active": true,

"id": "e2faaa9e-4b2d-4212-bb60-fd62970b2113"

},

"operator": {

"code": "moh",

"name": "Ministry of Health",

"displayOrder": 1,

"id": "9456c3e9-c4a6-4a28-9e08-47ceb16a4121"

},

"active": true,

"enabled": true,

"openLmisAccessible": true,

"supportedPrograms": [

{

"code": "PRG003",

"name": "New program",

"active": true,

"periodsSkippable": false,

"id": "66032ea8-b69b-4102-a1eb-844e57143187"

}

],

"id": "19121381-9f3d-4e77-b9e5-d3f59fc1639e"

},

"verified": true,

"active": true,

"loginRestricted": false,

"roleAssignments": [

{

"roleId": "d30a2fbb-51d9-49ad-90fe-fb405470a439",

"programCode": "PRG003PRG001",

"supervisoryNodeCode": "N3N1"

}]


}


78

66032ea8b69b4102a1eb844e57143187191213819f3d4e77b9e5d3f59fc1639e0eff62d785a64a3f8c4a62466e3d0734

Image Added

true


9

Assign the devadmin a facility for supervisingfulfill.


Image Added

 {
              "id": "56a50e9a-9668-437d-a09c-7e709ce22222",
    "username": "devadmin",
    "firstName": "Admin",
    "lastName": "Admin",
    "email": "devadmin@openlmis.org",
    "timezone": "CET",
    "homeFacility": {
      "code": "W01",
      "name": "CMST Warehouse",
      "geographicZone": {
        "code": "Mal-So",
        "name": "Southern Region",
        "level": {
          "code": "Region",
          "levelNumber": 2,
          "id": "9b497d87-cdd9-400e-bb04-fae0bf6a9491"
        },
        "id": "0bbd69c1-e20f-48f5-aae4-26dcd8aa7602"
      },
      "type": {
        "code": "WH",
        "name": "Warehouse",
        "displayOrder": 3,
        "active": true,
        "id": "e2faaa9e-4b2d-4212-bb60-fd62970b2113"
      },
      "operator": {
        "code": "moh",
        "name": "Ministry of Health",
        "displayOrder": 1,
        "id": "9456c3e9-c4a6-4a28-9e08-47ceb16a4121"
      },
      "active": true,
      "enabled": true,
      "openLmisAccessible": true,
      "supportedPrograms": [
        {
          "code": "PRG003",
          "name": "New program",
          "active": true,
          "periodsSkippable": false,
          "id": "66032ea8-b69b-4102-a1eb-844e57143187"
        }
      ],
      "id": "19121381-9f3d-4e77-b9e5-d3f59fc1639e"
    },
    "verified": true,
    "active": true,
    "loginRestricted": false,
    "roleAssignments": [
          {
        "roleId": "185db8f7-ee35-44d0-8b40-6de12489ae77",
        "warehouseCode": "FAC004"
      }
      ]

  }

810

  Check if devadmin has fulfillment right for facility which he supervises.

     URL:http://19210.168222.117.14134/referencedata/api/users/56a50e9a-9668-437d-a09c-7e709ce22222/hasRight?rightId=f1469a6d3e181470-f1d1ca69-4d704f26-a31ba8a9-f9a79662c82130f947bc0929&warehouseId=ab95f1cf-ae8d-4888-ba9d-05141d3f50de&access_token=ad3b5205287fc724-bbc5c58b-4a954151-95bcb3ae-b8de0b969747d90487c0b7b1

true

Image Added




Post – conditions: