Server-admin user management commands and member-detail reads.
Summary
Functions
Assigns a role to a user. Requires role.assign, and non-owner callers may only assign roles whose granted authority they already possess.
Gets server member rows for multiple users. Requires admin.view-users.
Updates another user's password as an admin action. Requires user.manage-accounts and a fresh credential for the caller; the caller cannot target their own account.
Clears the target user's self-service username-change cooldown. Requires user.manage-accounts, including when the caller targets their own account.
Deletes a user account as an admin action. Requires user.delete-any for other users or user.delete-self for the caller.
Gets one server member plus role/permission metadata for admin details. Requires admin.view-users. Returns NOT_FOUND when the user does not exist.
Gets explicit roles and current assignment limits for one human user. Requires effective role.assign; admin.view-users is not required. Returns NOT_FOUND for an unknown or deleted user, and FAILED_PRECONDITION for a bot account.
Lists server members for the admin members screen. Requires admin.view-users.
Revokes a role from a user. Requires role.assign, and non-owner callers may only revoke roles whose permission decisions are within their authority.
Deactivates or reactivates a human account. Requires user.manage-accounts. The caller cannot target their own account or an owner account. Deactivation invalidates existing sessions within one minute in the worst case and prevents sign-in. Reactivation permits new sign-ins; old sessions remain invalid. Repeating the current state succeeds without changing it.
Functions
@spec assign_role(Req.Request.t(), Chatto.Admin.V1.AssignRoleRequest.t()) :: {:ok, Chatto.Admin.V1.AssignRoleResponse.t()} | {:error, Chatto.Connect.Error.t()}
Assigns a role to a user. Requires role.assign, and non-owner callers may only assign roles whose granted authority they already possess.
@spec batch_get_members(Req.Request.t(), Chatto.Admin.V1.BatchGetMembersRequest.t()) :: {:ok, Chatto.Admin.V1.BatchGetMembersResponse.t()} | {:error, Chatto.Connect.Error.t()}
Gets server member rows for multiple users. Requires admin.view-users.
@spec change_user_password( Req.Request.t(), Chatto.Admin.V1.ChangeUserPasswordRequest.t() ) :: {:ok, Chatto.Admin.V1.ChangeUserPasswordResponse.t()} | {:error, Chatto.Connect.Error.t()}
Updates another user's password as an admin action. Requires user.manage-accounts and a fresh credential for the caller; the caller cannot target their own account.
@spec clear_username_cooldown( Req.Request.t(), Chatto.Admin.V1.ClearUsernameCooldownRequest.t() ) :: {:ok, Chatto.Admin.V1.ClearUsernameCooldownResponse.t()} | {:error, Chatto.Connect.Error.t()}
Clears the target user's self-service username-change cooldown. Requires user.manage-accounts, including when the caller targets their own account.
@spec delete_user(Req.Request.t(), Chatto.Admin.V1.DeleteUserRequest.t()) :: {:ok, Chatto.Admin.V1.DeleteUserResponse.t()} | {:error, Chatto.Connect.Error.t()}
Deletes a user account as an admin action. Requires user.delete-any for other users or user.delete-self for the caller.
@spec get_member(Req.Request.t(), Chatto.Admin.V1.GetMemberRequest.t()) :: {:ok, Chatto.Admin.V1.GetMemberResponse.t()} | {:error, Chatto.Connect.Error.t()}
Gets one server member plus role/permission metadata for admin details. Requires admin.view-users. Returns NOT_FOUND when the user does not exist.
@spec get_user_role_assignments( Req.Request.t(), Chatto.Admin.V1.GetUserRoleAssignmentsRequest.t() ) :: {:ok, Chatto.Admin.V1.GetUserRoleAssignmentsResponse.t()} | {:error, Chatto.Connect.Error.t()}
Gets explicit roles and current assignment limits for one human user. Requires effective role.assign; admin.view-users is not required. Returns NOT_FOUND for an unknown or deleted user, and FAILED_PRECONDITION for a bot account.
@spec list_members(Req.Request.t(), Chatto.Admin.V1.ListMembersRequest.t()) :: {:ok, Chatto.Admin.V1.ListMembersResponse.t()} | {:error, Chatto.Connect.Error.t()}
Lists server members for the admin members screen. Requires admin.view-users.
@spec revoke_role(Req.Request.t(), Chatto.Admin.V1.RevokeRoleRequest.t()) :: {:ok, Chatto.Admin.V1.RevokeRoleResponse.t()} | {:error, Chatto.Connect.Error.t()}
Revokes a role from a user. Requires role.assign, and non-owner callers may only revoke roles whose permission decisions are within their authority.
@spec set_user_deactivated( Req.Request.t(), Chatto.Admin.V1.SetUserDeactivatedRequest.t() ) :: {:ok, Chatto.Admin.V1.SetUserDeactivatedResponse.t()} | {:error, Chatto.Connect.Error.t()}
Deactivates or reactivates a human account. Requires user.manage-accounts. The caller cannot target their own account or an owner account. Deactivation invalidates existing sessions within one minute in the worst case and prevents sign-in. Reactivation permits new sign-ins; old sessions remain invalid. Repeating the current state succeeds without changing it.