IAMService

AssignUserRoles 给用户分配角色;重复角色会自动去重;成功后失效该用户权限缓存。

post/v1/iam/users/{userId}/roles

Path parameters

userIdstring required

Request body

expiresAtstring

过期时间,Unix 秒;0 表示永不过期。

grantedBystring

授予人 ID;若为 0,service 层会尝试从 ctx 注入。

roleIdsstring[]
userIdstring

Response

OK

assignedinteger

Changes

No recorded changes to this endpoint across all 1 revision of this API.