Wiki

Case Status Kiln
Register Log In

Wiki

 
People Permissions
  • RSS Feed

Last modified on 8/16/2010 1:33 PM by User.

Tags:

People Permissions

Working with People Permissions

You can set a default permission on projects and repositories, but people permissions let you apply more granular permissions at the person-by-person level. The way a project or a repository determines whether you have access to it is this:

  • If you are an administrator, you are granted admin access.
  • If the project or repository has a permission record corresponding to your ixPerson, you are granted that access.
  • Otherwise, you are granted the default access.

Below we document read and write access to these custom permissions. Note: all the list parameters default to the empty list if omitted.

See Permissions for documentation about permissions on objects that are neither projects nor repositories.

Api/{version}/Project/{ixProject}/Permissions

Returns a list of permission records corresponding to ixProject.

Api/{version}/Project/{ixProject}/Permissions/CreateOrUpdate

Takes

  • ixPersons: a list of ixPerson corresponding to people
  • permissions: a list of permissions, one for each person

For each person in ixPerson with his or her corresponding permission "permission",

  • If ixPerson already has a permission set in ixProject, it's changed to "permission".
  • Otherwise, a new permission is created with permissions "permission".

Returns the newly updated list of permission records corresponding to ixProject. Protip: Setting a person's permission to "inherit" is tantamount to deleting it; the way permissions cascade makes the two actions equivalent.

Api/{version}/Project/{ixProject}/Permissions/Delete

Takes

  • ixPersons: a list of ixPerson corresponding to people

and deletes each person's permission record from the project.

Api/{version}/Repo/{ixRepo}/Permissions

Api/{version}/Repo/{ixRepo}/Permissions/CreateOrUpdate

Api/{version}/Repo/{ixRepo}/Permissions/Delete

These calls behave the same as their project counterparts except they act on the repository permission records.

Errors

The following machine codes may be returned as errors. See also Common Errors.

  • MismatchedArguments: the lengths of the ixPersons and permissions were not equal. Lists ixPersons and permissions are assumed to be empty if they are not omitted.
  • InvalidPermission: permission was not one of "none", "read", "write", "inherit", or "admin".
  • InvalidPerson: you are trying to delete an ixPerson who does not exist in the list.