Skip to content

Latest commit

 

History

History
57 lines (41 loc) · 985 Bytes

consumers_spec.md

File metadata and controls

57 lines (41 loc) · 985 Bytes

user_service Spec

Spec for consuming user authorization of a given project

Given a URL, it MUST respond with a boolean value as access to a request with the following parameters:

username: String
project: String
action: String

Allowed actions are:

  • download
  • push
  • force_push
  • admin

download

download allows a user to only download, meaning that pushing is disallowed for this user

push

push allows for downloading and pushing to a given project

force_push

force_push Allows for downloading, pushing, and push -f (force) pushing to the given project

admin

admin allows for any and all of the above actions, and anything else. Should always return true for any action.

Example request:

{ 
  "username": "jsmith",
  "project": "myproject",
  "action": "download"
}

Response:

{ 
  "access": true, 
  "status": "Optional Status like 'success'", 
  "message": "Optional message like 'has access'" 
}