← Back to team overview

dhis2-devs team mailing list archive

[Bug 1550308] [NEW] The /api/schemas endpoint does not return authorities

 

Public bug reported:

Trunk no longer returns the authorities for a schema. We use these to
determine the public/private create abilities for objects.

Where 2.22 returns an array with authorities related to the schema, the
current version of trunk just returns an empty array.

https://play.dhis2.org/demo/api/schemas/dataElement.json
```
authorities: [
  {
    type: "CREATE_PUBLIC",
    authorities: ["F_DATAELEMENT_PUBLIC_ADD"]
  },
  {
    type: "CREATE_PRIVATE",
    authorities: ["F_DATAELEMENT_PRIVATE_ADD"]
  },
  {
    type: "DELETE",
    authorities: ["F_DATAELEMENT_DELETE"]
  }
],
```

https://play.dhis2.org/dev/api/schemas/dataElement.json
```
authorities: [ ],
```

** Affects: dhis2
     Importance: Undecided
         Status: New


** Tags: api schemas

-- 
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1550308

Title:
  The /api/schemas endpoint does not return authorities

Status in DHIS:
  New

Bug description:
  Trunk no longer returns the authorities for a schema. We use these to
  determine the public/private create abilities for objects.

  Where 2.22 returns an array with authorities related to the schema,
  the current version of trunk just returns an empty array.

  https://play.dhis2.org/demo/api/schemas/dataElement.json
  ```
  authorities: [
    {
      type: "CREATE_PUBLIC",
      authorities: ["F_DATAELEMENT_PUBLIC_ADD"]
    },
    {
      type: "CREATE_PRIVATE",
      authorities: ["F_DATAELEMENT_PRIVATE_ADD"]
    },
    {
      type: "DELETE",
      authorities: ["F_DATAELEMENT_DELETE"]
    }
  ],
  ```

  https://play.dhis2.org/dev/api/schemas/dataElement.json
  ```
  authorities: [ ],
  ```

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1550308/+subscriptions


Follow ups