Grant Access to a Tugboat Project

Grant a Tugboat API Key either user or admin access to a project. These permissions are automatically inherited by any repositories in the project.

Arguments

  • project - Required
    The ID of the project to grant access to.

  • users - Optional
    A list of API Key IDs that should have user-level access to the project, and any repositories in it. This can be a single ID, or an array of IDs. This value is appended to any users already assigned to the project.

  • admins - Optional
    A list of API Key IDs that should have admin-level access to the project, and any repositories in it. This can be a single ID, or an array of IDs. This value is appended to any admins already assigned to the project.

Example

socket.emit('tugboat', 'projects', 'grant', args, callback);

Output

single

[
    {
        "updatedAt": "2017-02-14T18:47:18.102Z",
        "createdAt": "2017-02-14T18:47:18.102Z",
        "name": "test",
        "_id": "58a350b6ce7c680001458884",
        "sleep": true,
        "base": false,
        "size": 0,
        "quota": 0,
        "admins": ["58a22d61f405580001b36b84"],
        "users": ["58a22d61f405580001b36b86"],
        "id": "58a350b6ce7c680001458884"
    }
]

array

[
    {
        "updatedAt": "2017-02-14T18:47:18.102Z",
        "createdAt": "2017-02-14T18:47:18.102Z",
        "name": "test",
        "_id": "58a350b6ce7c680001458884",
        "sleep": true,
        "base": false,
        "size": 0,
        "quota": 0,
        "admins": ["58a22d61f405580001b36b84"],
        "users": ["58a22d61f405580001b36b86"],
        "id": "58a350b6ce7c680001458884"
    }
]

Errors

  • 1003: No Projects Found
    Returned if the requested projects do not exist, or the requestor does not have permission to update them.

  • 1004: No Project ID Provided
    The required project argument was not included in the request.

results matching ""

    No results matching ""