Copyright | (c) Rob Stewart Heriot-Watt University 2019 |
---|---|
License | BSD3 |
Maintainer | [email protected] |
Stability | stable |
Safe Haskell | None |
Language | Haskell2010 |
GitLab.API.Users
Contents
- List users
- Single user
- User creation
- User modification
- Delete authentication identity from user
- User deletion
- List current user
- User status
- Get the status of a user
- Get user preferences
- Follow and unfollow users
- User counts
- List SSH keys
- List SSH keys for user
- Add SSH key
- Add SSH key for user
- Delete SSH key for current user
- Delete SSH key for given user
- List emails
- List emails for user
- Block or unblock user
- Activate or deactivate user
- Ban or unban user
- Approve or reject user
- Users attributes
Description
Synopsis
- users :: GitLab [User]
- user :: Int -> GitLab (Either (Response ByteString) (Maybe User))
- searchUser :: Text -> GitLab (Maybe User)
- createUser :: Text -> Text -> Text -> UserAttrs -> GitLab (Either (Response ByteString) (Maybe User))
- userAttributes :: User -> Bool -> UserAttrs
- modifyUser :: Int -> UserAttrs -> GitLab (Either (Response ByteString) (Maybe User))
- deleteAuthIdentity :: User -> Text -> GitLab (Either (Response ByteString) (Maybe ()))
- deleteUser :: User -> GitLab (Either (Response ByteString) (Maybe ()))
- currentUser :: GitLab User
- currentUserStatus :: GitLab UserStatus
- userStatus :: User -> GitLab UserStatus
- userPreferences :: GitLab UserPrefs
- followUser :: User -> GitLab (Either (Response ByteString) (Maybe User))
- unfollowUser :: User -> GitLab (Either (Response ByteString) (Maybe User))
- currentUserCounts :: GitLab UserCount
- currentUserSshKeys :: GitLab Key
- userSshKeys :: User -> GitLab Key
- addSshKeyCurrentUser :: Text -> Text -> GitLab (Either (Response ByteString) (Maybe Key))
- addSshKeyUser :: User -> Text -> Text -> GitLab (Either (Response ByteString) (Maybe Key))
- deleteSshKeyCurrentUser :: Int -> GitLab (Either (Response ByteString) (Maybe ()))
- deleteSshKeyUser :: User -> Int -> GitLab (Either (Response ByteString) (Maybe ()))
- emails :: GitLab [Email]
- emailsCurrentUser :: User -> GitLab [Email]
- blockUser :: User -> GitLab (Maybe User)
- unblockUser :: User -> GitLab (Maybe User)
- activateUser :: User -> GitLab (Maybe User)
- deactivateUser :: User -> GitLab (Maybe User)
- banUser :: User -> GitLab (Maybe User)
- unbanUser :: User -> GitLab (Maybe User)
- approveUser :: User -> GitLab (Maybe User)
- rejectUser :: User -> GitLab (Maybe User)
- defaultUserFilters :: UserAttrs
- data UserAttrs = UserAttrs {
- userFilter_admin :: Maybe Bool
- userFilter_bio :: Maybe Text
- userFilter_can_create_group :: Maybe Bool
- userFilter_email :: Maybe Text
- userFilter_extern_uid :: Maybe Int
- userFilter_external :: Maybe Bool
- userFilter_force_random_password :: Maybe Bool
- userFilter_group_id_for_saml :: Maybe Int
- userFilter_linkedin :: Maybe Text
- userFilter_location :: Maybe Text
- userFilter_name :: Maybe Text
- userFilter_note :: Maybe Text
- userFilter_organization :: Maybe Text
- userFilter_password :: Maybe Text
- userFilter_private_profile :: Maybe Bool
- userFilter_projects_limit :: Maybe Int
- userFilter_providor :: Maybe Text
- userFilter_reset_password :: Maybe Bool
- userFilter_skip_confirmation :: Maybe Bool
- userFilter_skype :: Maybe Text
- userFilter_theme_id :: Maybe Int
- userFilter_twitter :: Maybe Text
- userFilter_username :: Maybe Text
- userFilter_view_diffs_file_by_file :: Maybe Bool
- userFilter_website :: Maybe Text
- userFilter_pronouns :: Maybe Text
List users
Single user
Get a single user.
searches for a user given a username.
User creation
Arguments
:: Text | email address |
-> Text | user's name |
-> Text | user's username |
-> UserAttrs | optional attributes |
-> GitLab (Either (Response ByteString) (Maybe User)) |
Creates a new user. Note only administrators can create new users. Either password, reset_password, or force_random_password must be specified. If reset_password and force_random_password are both false, then password is required. force_random_password and reset_password take priority over password. In addition, reset_password and force_random_password can be used together.
User modification
Arguments
:: User | the user |
-> Bool | is the user a GitLab server administrator |
-> UserAttrs | the extracted user attributes |
Extracts the user attributes for a user. Useful for modifying
attrbibutes with modifyUser
.
Arguments
:: Int | user ID |
-> UserAttrs | optional attributes |
-> GitLab (Either (Response ByteString) (Maybe User)) |
Modifies an existing user. Only administrators can change attributes of a user.
Delete authentication identity from user
Arguments
:: User | user |
-> Text | external providor name |
-> GitLab (Either (Response ByteString) (Maybe ())) |
Deletes a user’s authentication identity using the provider name associated with that identity. Available only for administrators.
User deletion
Deletes a user. Available only for administrators.
List current user
currentUser :: GitLab User Source #
Get current user.
User status
currentUserStatus :: GitLab UserStatus Source #
Get current user status.
Get the status of a user
Get user preferences
userPreferences :: GitLab UserPrefs Source #
Get the status of the current user.
Follow and unfollow users
Follow a user.
Unfollow a user.
User counts
currentUserCounts :: GitLab UserCount Source #
Get the counts of the currently signed in user.
List SSH keys
currentUserSshKeys :: GitLab Key Source #
Get a list of currently authenticated user’s SSH keys.
List SSH keys for user
Add SSH key
Creates a new key owned by the currently authenticated user.
Add SSH key for user
Create new key owned by specified user. Available only for administrator.
Delete SSH key for current user
deleteSshKeyCurrentUser Source #
Deletes key owned by currently authenticated user.
Delete SSH key for given user
Deletes key owned by a specified user. Available only for administrator.
List emails
List emails for user
Get a list of currently authenticated user’s emails.
Block or unblock user
Blocks the specified user. Available only for administrator.
Unblocks the specified user. Available only for administrator.
Activate or deactivate user
Activates the specified user. Available only for administrator.
Deactivates the specified user. Available only for administrator.
Ban or unban user
Bans the specified user. Available only for administrator.
Unbans the specified user. Available only for administrator.
Approve or reject user
Approves the specified user. Available only for administrator.
Rejects specified user that is pending approval. Available only for administrator.
Users attributes
defaultUserFilters :: UserAttrs Source #
No group filters applied, thereby returning all groups.
Attributes related to a group
Constructors
UserAttrs | |
Fields
|