Overview
As "Deleted" is a very dangerous state, it's not possible to delete a project with this API.
Moreover, manipulating a project status is a site admin capabilities. It's not recommended to let site admin credentials in clear somewhere and it can be dangerous to use them in API calls as they have a full access on all end points. In order to mitigate this risk, a new "Permission delegation" is introduced (as tracker or mediawiki global admin): "REST project management".
Functional overview
REST project management permissions
Introduce this new permission to be associated to groups.
The permission will apply on:
-
PATCH /projects/:id
-
GET /projects/:id
-
POST /projects
REST routes
PATCH /projects/:id
{
"status": enum{"active", "suspended"}
}
The route should check whether the user is site administrator or has "REST project management" capability.
GET /projects/:id
The route is updated to include the status field.
In addition to that the behaviour with deleted, suspended and pedning projects shall be checked so only site administrators + delegated "REST Project Management" can access projects that are not active.