Copyright | (c) Rob Stewart Heriot-Watt University 2021 |
---|---|
License | BSD3 |
Maintainer | robstewart57@gmail.com |
Stability | stable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Synopsis
- data AccessLevel
- = Guest
- | Reporter
- | Developer
- | Maintainer
- | Owner
- memberOfProject :: Project -> Int -> GitLab (Either (Response ByteString) (Maybe Member))
- membersOfProject :: Project -> GitLab [Member]
- memberOfProjectWithInherited :: Project -> Int -> GitLab (Either (Response ByteString) (Maybe Member))
- membersOfProjectWithInherited :: Project -> GitLab (Either (Response ByteString) [Member])
- addMemberToProject :: Project -> AccessLevel -> User -> GitLab (Either (Response ByteString) (Maybe Member))
- addMembersToProject :: Project -> AccessLevel -> [User] -> GitLab [Either (Response ByteString) (Maybe Member)]
- editMemberOfProject :: Project -> AccessLevel -> User -> GitLab (Either (Response ByteString) (Maybe Member))
- removeUserFromProject :: Project -> User -> GitLab (Either (Response ByteString) (Maybe ()))
- memberOfGroup :: Group -> Int -> GitLab (Either (Response ByteString) (Maybe Member))
- membersOfGroup :: Group -> GitLab (Either (Response ByteString) [Member])
- memberOfGroupWithInherited :: Group -> Int -> GitLab (Either (Response ByteString) (Maybe Member))
- membersOfGroupWithInherited :: Group -> GitLab (Either (Response ByteString) [Member])
- addAllUsersToGroup :: Group -> AccessLevel -> GitLab [Either (Response ByteString) (Maybe Member)]
- addUserToGroup :: Group -> AccessLevel -> User -> GitLab (Either (Response ByteString) (Maybe Member))
- addUsersToGroup :: Group -> AccessLevel -> [User] -> GitLab [Either (Response ByteString) (Maybe Member)]
- editMemberOfGroup :: Group -> AccessLevel -> User -> GitLab (Either (Response ByteString) (Maybe Member))
- removeUserFromGroup :: Group -> User -> GitLab (Either (Response ByteString) (Maybe ()))
- approvePendingMember :: Group -> User -> GitLab (Either (Response ByteString) (Maybe Member))
- approveAllPendingMembers :: Group -> GitLab (Either (Response ByteString) (Maybe Member))
- pendingMembers :: Group -> GitLab (Either (Response ByteString) [Member])
Documentation
data AccessLevel Source #
the access levels for project members. See https://docs.gitlab.com/ee/user/permissions.html#project-members-permissions
Instances
Show AccessLevel Source # | |
Defined in GitLab.Types showsPrec :: Int -> AccessLevel -> ShowS # show :: AccessLevel -> String # showList :: [AccessLevel] -> ShowS # | |
Eq AccessLevel Source # | |
Defined in GitLab.Types (==) :: AccessLevel -> AccessLevel -> Bool # (/=) :: AccessLevel -> AccessLevel -> Bool # |
Projects
Project membership
:: 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 #
:: 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
:: Project | project ID |
-> AccessLevel | level of access |
-> User | user ID |
-> GitLab (Either (Response ByteString) (Maybe Member)) |
Adds a member to a project.
:: 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
:: 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 #
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
:: 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 #
:: 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
:: Group | the group |
-> AccessLevel | level of access granted |
-> GitLab [Either (Response ByteString) (Maybe Member)] |
adds all registered users to a group.
:: Group | the group |
-> AccessLevel | level of access granted |
-> User | the user |
-> GitLab (Either (Response ByteString) (Maybe Member)) |
Adds a member to a group.
:: 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
:: 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
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
Approves a pending user for a group and its subgroups and projects.
approveAllPendingMembers Source #
Approves all pending users for a group and its subgroups and projects.
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.