Cloud-Harvest / CloudHarvestApi

interface between clients, the server cache, and other apis
Other
0 stars 0 forks source link

Roles #13

Open fiona-june-leathers opened 1 year ago

fiona-june-leathers commented 1 year ago

A role defines the commands which commands Harvest allows a user to run.

Every command (and subcommand) should include a list of acceptable role names.

Unauthorized errors should be specific that the command cannot be executed because it is not in the role, optionally providing a list of expected roles.

Examples

{
    "role": "HarvestAdmin"
    "commands": [
    ]
    "inherits": [
        "HarvestUserAdmin",
        "HarvestRoleAdmin"
    ]
}
{
    "role": "HarvestUserAdmin"
    "commands": [
         "users.*"
    ]
}