Create Permission

Description

Create permissions.

To create a permission, the user must have appropriate rights.

The permitted object is specified either by an objectReference, or appropriate ids for the type of object pertinent to the permission type.  See the documentation for the Get Permission List service for a list of types and ids.

Response permissions have additional rules, that the criterion being permitted must live within the asset's document.

Input

<CreatePermission>
<userLogonReference>userid</userLogonReference>
<password>password</password>
<permissionTypeIdentifier>permission type id</permissionTypeIdentifier> <permissionTypeReference>permission type ref</permissionTypeReference> <userGroupIdentifier>id</userGroupIdentifier>
<userGroupReference>reference</userGroupReference>
<objectReference>ref</objectReference>
<permissionOnAssetIdentifier>asset id</permissionOnAssetIdentifier>
<permissionOnCriterionIdentifier>criterion id</permissionOnCriterionIdentifier>
<permissionOnUserGroupIdentifier>user group id</permissionOnUserGroupIdentifier>
<permissionOnLicenseIdentifier>license id</permissionOnLicenseIdentifier>
</CreatePermission>

The permission type is specified by its id or reference. If both are given, id takes precedence.

The user group to which permissions will be granted is specified by its id or reference. If both are given, id takes precedence.

If the userGroupReference is not valid, or the user may not grant to it, a user error is returned.

All other errors in the input result in a parameter error.

Output

<CreatePermission>
<errorNumber>0</errorNumber>
</CreatePermission>

If a user error is returned, errorMessage and errorFields will also be returned.

Errors

101 - not authorised (i.e. not authorised to create permission)
102 - not found
103 - parameter error
105 - user error

Class

com.metrici.xerula.CreatePermissionService