Add user permission
Description
Add a user permission for a service.
##Package Details
Interface
IUserServicePermissionManager
Syntax
await UserServicePermissionManager.Add(UserServicePermission);
Returns
Task<UserServicePermission>
API
POST
/api/v1/users/{id}/permissions
Parameters
Path
Id: The user's id
Request Body{
"PermissionId": 0,
"ServiceId": 0,
"OrganizationId": 0
}
Returns
200 OK - User Service Permission
Example
const int userId = 2757;
const int serviceId = 2;
const int permissionId = 3;
const int organizationId = 9999;
var newUserServicePermission = new UserServicePermission
{
PermissionId = permissionId,
UserId = userId,
ServiceId = serviceId,
OrganizationId = organization2Id
};
var userServicePermission = await _userServicePermissionManager.Add(newUserServicePermission);
TODO