gitlab-haskell-1.0.0.5: A Haskell library for the GitLab web API
Copyright(c) Rob Stewart Heriot-Watt University 2021
LicenseBSD3
Maintainerrobstewart57@gmail.com
Stabilitystable
Safe HaskellSafe-Inferred
LanguageHaskell2010

GitLab.API.Members

Description

 
Synopsis

Documentation

data AccessLevel Source #

Instances

Instances details
Show AccessLevel Source # 
Instance details

Defined in GitLab.Types

Eq AccessLevel Source # 
Instance details

Defined in GitLab.Types

Projects

Project membership

memberOfProject Source #

Arguments

:: Project

The project

-> Int

The user ID of the member

-> GitLab (Either (Response ByteString) (Maybe Member)) 

Gets a member of a project. Returns only direct members and not inherited members through ancestor groups.

membersOfProject :: Project -> GitLab [Member] Source #

Gets a list of project members viewable by the authenticated user. Returns only direct members and not inherited members through ancestors groups.

memberOfProjectWithInherited Source #

Arguments

:: Project

The project

-> Int

The user ID of the member

-> GitLab (Either (Response ByteString) (Maybe Member)) 

Gets a member of a project, including members inherited or invited through ancestor groups.

If a user is a member of this project and also of one or more ancestor groups, only its membership with the highest access_level is returned. This represents the effective permission of the user.

Members from an invited group are returned if either: the invited group is public, or the requester is also a member of the invited group.

membersOfProjectWithInherited :: Project -> GitLab (Either (Response ByteString) [Member]) Source #

Gets a list of project members viewable by the authenticated user, including inherited members, invited users, and permissions through ancestor groups.

If a user is a member of this project and also of one or more ancestor groups, only its membership with the highest access_level is returned. This represents the effective permission of the user.

Members from an invited group are returned if either: the invited group is public, or the requester is also a member of the invited group.

Adding project members

addMemberToProject Source #

Arguments

:: Project

project ID

-> AccessLevel

level of access

-> User

user ID

-> GitLab (Either (Response ByteString) (Maybe Member)) 

Adds a member to a project.

addMembersToProject Source #

Arguments

:: Project

the project

-> AccessLevel

level of access

-> [User]

users to add to the project

-> GitLab [Either (Response ByteString) (Maybe Member)] 

adds a list of users to a project with the given access level. Returns 'Right Member' for each successful action, otherwise it returns 'Left Status'.

Editing project members

editMemberOfProject Source #

Arguments

:: Project

the project

-> AccessLevel

the new level of access

-> User

user ID

-> GitLab (Either (Response ByteString) (Maybe Member)) 

Updates a member of a project.

Removing project members

removeUserFromProject Source #

Arguments

:: Project

the project

-> User

user

-> GitLab (Either (Response ByteString) (Maybe ())) 

Removes a user from a project where the user has been explicitly assigned a role.

The user needs to be a group member to qualify for removal. For example, if the user was added directly to a project within the group but not this group explicitly, you cannot use this API to remove them.

Groups

Group membership

memberOfGroup Source #

Arguments

:: Group

The group

-> Int

The user ID of the member

-> GitLab (Either (Response ByteString) (Maybe Member)) 

Gets a member of a group. Returns only direct members and not inherited members through ancestor groups.

membersOfGroup :: Group -> GitLab (Either (Response ByteString) [Member]) Source #

Gets a list of group members viewable by the authenticated user. Returns only direct members and not inherited members through ancestors groups.

memberOfGroupWithInherited Source #

Arguments

:: Group

The group

-> Int

The user ID of the member

-> GitLab (Either (Response ByteString) (Maybe Member)) 

Gets a member of a group, including members inherited or invited through ancestor groups.

If a user is a member of this group and also of one or more ancestor groups, only its membership with the highest access_level is returned. This represents the effective permission of the user.

Members from an invited group are returned if either: the invited group is public, or the requester is also a member of the invited group.

membersOfGroupWithInherited :: Group -> GitLab (Either (Response ByteString) [Member]) Source #

Gets a list of group members viewable by the authenticated user, including inherited members, invited users, and permissions through ancestor groups.

If a user is a member of this group and also of one or more ancestor groups, only its membership with the highest access_level is returned. This represents the effective permission of the user.

Members from an invited group are returned if either: the invited group is public, or the requester is also a member of the invited group.

Adding group members

addAllUsersToGroup Source #

Arguments

:: Group

the group

-> AccessLevel

level of access granted

-> GitLab [Either (Response ByteString) (Maybe Member)] 

adds all registered users to a group.

addUserToGroup Source #

Arguments

:: Group

the group

-> AccessLevel

level of access granted

-> User

the user

-> GitLab (Either (Response ByteString) (Maybe Member)) 

Adds a member to a group.

addUsersToGroup Source #

Arguments

:: Group

the group

-> AccessLevel

level of access granted

-> [User]

list of usernames to be added to the group

-> GitLab [Either (Response ByteString) (Maybe Member)] 

adds a list of users to a group.

Editing group members

editMemberOfGroup Source #

Arguments

:: Group

the group

-> AccessLevel

the new level of access

-> User

user ID

-> GitLab (Either (Response ByteString) (Maybe Member)) 

Updates a member of a group.

Removing group members

removeUserFromGroup Source #

Arguments

:: Group

the group

-> User

user

-> GitLab (Either (Response ByteString) (Maybe ())) 

Removes a user from a group where the user has been explicitly assigned a role.

The user needs to be a group member to qualify for removal. For example, if the user was added directly to a project within the group but not this group explicitly, you cannot use this API to remove them.

Pending members

approvePendingMember Source #

Arguments

:: Group

the group

-> User

the member

-> GitLab (Either (Response ByteString) (Maybe Member)) 

Approves a pending user for a group and its subgroups and projects.

approveAllPendingMembers Source #

Arguments

:: Group

the group

-> GitLab (Either (Response ByteString) (Maybe Member)) 

Approves all pending users for a group and its subgroups and projects.

pendingMembers Source #

Arguments

:: Group

the group

-> GitLab (Either (Response ByteString) [Member]) 

For a group and its subgroups and projects, get a list of all members in an awaiting state and those who are invited but do not have a GitLab account. This request returns all matching group and project members from all groups and projects in the root group’s hierarchy. When the member is an invited user that has not signed up for a GitLab account yet, the invited email address is returned. This API endpoint works on top-level groups only. It does not work on subgroups. This API endpoint requires permission to administer members for the group.