enterpriseusers

package
v1.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package enterpriseusers implements GitLab enterprise user operations for groups including list, get, disable 2FA, and delete.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(ctx context.Context, client *gitlabclient.Client, in DeleteInput) error

Delete removes an enterprise user.

func Disable2FA

func Disable2FA(ctx context.Context, client *gitlabclient.Client, in Disable2FAInput) error

Disable2FA disables two-factor authentication for an enterprise user.

func FormatListMarkdown

func FormatListMarkdown(out ListOutput) string

FormatListMarkdown renders enterprise users as a Markdown table.

func FormatOutputMarkdown

func FormatOutputMarkdown(o Output) string

FormatOutputMarkdown renders a single enterprise user as Markdown.

func RegisterTools

func RegisterTools(server *mcp.Server, client *gitlabclient.Client)

RegisterTools registers MCP tools for GitLab enterprise user operations.

Types

type DeleteInput

type DeleteInput struct {
	GroupID    toolutil.StringOrInt `json:"group_id"    jsonschema:"Group ID or URL-encoded path,required"`
	UserID     int64                `json:"user_id"     jsonschema:"User ID,required"`
	HardDelete *bool                `json:"hard_delete,omitempty" jsonschema:"Permanently delete user instead of soft delete"`
}

DeleteInput holds parameters for deleting an enterprise user.

type Disable2FAInput

type Disable2FAInput struct {
	GroupID toolutil.StringOrInt `json:"group_id" jsonschema:"Group ID or URL-encoded path,required"`
	UserID  int64                `json:"user_id"  jsonschema:"User ID,required"`
}

Disable2FAInput holds parameters for disabling 2FA for an enterprise user.

type GetInput

type GetInput struct {
	GroupID toolutil.StringOrInt `json:"group_id" jsonschema:"Group ID or URL-encoded path,required"`
	UserID  int64                `json:"user_id"  jsonschema:"User ID,required"`
}

GetInput holds parameters for getting a single enterprise user.

type ListInput

type ListInput struct {
	GroupID       toolutil.StringOrInt `json:"group_id"        jsonschema:"Group ID or URL-encoded path,required"`
	Username      string               `json:"username,omitempty" jsonschema:"Filter by exact username"`
	Search        string               `json:"search,omitempty"   jsonschema:"Search by name or username or email"`
	Active        *bool                `json:"active,omitempty"   jsonschema:"Filter for active users only"`
	Blocked       *bool                `json:"blocked,omitempty"  jsonschema:"Filter for blocked users only"`
	CreatedAfter  string               `json:"created_after,omitempty"  jsonschema:"Filter users created after this date (ISO 8601)"`
	CreatedBefore string               `json:"created_before,omitempty" jsonschema:"Filter users created before this date (ISO 8601)"`
	TwoFactor     string               `json:"two_factor,omitempty"     jsonschema:"Filter by 2FA status: enabled or disabled"`
	toolutil.PaginationInput
}

ListInput holds parameters for listing enterprise users.

type ListOutput

type ListOutput struct {
	toolutil.HintableOutput
	Users      []Output                  `json:"users"`
	Pagination toolutil.PaginationOutput `json:"pagination"`
}

ListOutput holds the list response.

func List

func List(ctx context.Context, client *gitlabclient.Client, in ListInput) (ListOutput, error)

List returns all enterprise users for a group.

type Output

type Output struct {
	toolutil.HintableOutput
	ID               int64  `json:"id"`
	Username         string `json:"username"`
	Name             string `json:"name"`
	Email            string `json:"email"`
	State            string `json:"state"`
	WebURL           string `json:"web_url"`
	IsAdmin          bool   `json:"is_admin"`
	Bot              bool   `json:"bot"`
	TwoFactorEnabled bool   `json:"two_factor_enabled"`
	External         bool   `json:"external"`
	Locked           bool   `json:"locked"`
	CreatedAt        string `json:"created_at,omitempty"`
}

Output represents an enterprise user.

func Get

func Get(ctx context.Context, client *gitlabclient.Client, in GetInput) (Output, error)

Get returns details for a single enterprise user.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL