Skip to content

adding a permissions endpoint to get all permissions about a person

Luke Preston requested to merge permissions into develop

Problems

  • new API does not know who a person is, or what they can do
  • new API does not know the difference between a remote-user and none remote-user as it does not contain the DevelopmentUserStoreConfig

Solution

create a new permissions endpoint which takes form of

/permissions?catalogue=eidc
/permissions?catalogue=eidc&id=1234123214
/permissions?id=1234123214
/permissions

and returns

{
    "identity": "superadmin",
    "view": true,
    "edit": true,
    "delete": true,
    "upload": true,
    "create": true,
    "datacite": true,
    "makePublic": true,
    "editRestrictedFields": true,
    "catalogue": "eidc",
    "id": "ff55462e-38a4-4f30-b562-f82ff263d9c3",
    "groups": [
        {
            "name": "CEH",
            "description": "Centre for Ecology & Hydrology"
        },
        {
            "name": "role_eidc_editor",
            "description": "EIDC Editor Role"
        },
        {
            "name": "role_eidc_publisher",
            "description": "EIDC Publisher Role"
        },
        {
            "name": "ROLE_CIG_SYSTEM_ADMIN",
            "description": "System Admin Role"
        },
        {
            "name": "ROLE_DATACITE",
            "description": "Datacite Role"
        }
    ]
}

Merge request reports

Loading