GetPermissionByService() [UserManager]

Get all permissions for a user and service ID

Description

The GetPermissionByService() method is used to get all permissions for a specific user and service ID.

Package Details

Interface

IUserManager

Syntax

await _userManager.GetPermissionByService(int userId, int serviceId)

Returns

Task<ICollection<UserServicePermissionInfo>>

API

GET
/api/v1/users/{id}/permissions?serviceId={serviceId}

Parameters

Parameter

Description

Parameter Type

Parameter

Description

Parameter Type

id

The user Id to search for

Path

serviceId

The Id of the service

Query string

Returns

If the user is found, 200 Ok

On error, 400 Bad Request

On authorization error, 403 Forbidden

Example

int userId = 41; int serviceId = 2; var userPermissions = await _userManager.GetPermissions(userId, serviceId);