groups

package
v1.13.2 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2023 License: MIT Imports: 26 Imported by: 0

Documentation

Overview

Package groups provides API services to manage groups.

Index

Constants

View Source
const (
	OriginGroupMembership = "group_membership"
	OriginItemUnlocking   = "item_unlocking"
	OriginSelf            = "self"
	OriginOther           = "other"
	OriginComputed        = "computed"
	OriginGranted         = "granted"
)

Variables

This section is empty.

Functions

func GenerateGroupCode

func GenerateGroupCode() (string, error)

GenerateGroupCode generate a random code for a group.

Types

type GroupGetResponseCodePart

type GroupGetResponseCodePart struct {
	// Nullable; returned only if the current user is a manager
	Code *string `json:"code"`
	// Nullable; returned only if the current user is a manager
	CodeLifetime *int32 `json:"code_lifetime"`
	// Nullable; returned only if the current user is a manager
	CodeExpiresAt *database.Time `json:"code_expires_at"`
}

GroupGetResponseCodePart contains fields related to the group's code. These fields are only displayed if the current user is a manager of the group. swagger:ignore

type GroupManagersViewResponseRowThroughAncestorGroups

type GroupManagersViewResponseRowThroughAncestorGroups struct {
	// enum: none,memberships,memberships_and_group
	// displayed only when include_managers_of_ancestor_groups=1, note that the group is an ancestor of itself
	CanManageThroughAncestorGroups string `json:"can_manage_through_ancestor_groups"`
	// displayed only when include_managers_of_ancestor_groups=1, note that the group is an ancestor of itself
	CanGrantGroupAccessThroughAncestorGroups bool `json:"can_grant_group_access_through_ancestor_groups"`
	// displayed only when include_managers_of_ancestor_groups=1, note that the group is an ancestor of itself
	CanWatchMembersThroughAncestorGroups bool `json:"can_watch_members_through_ancestor_groups"`
}

GroupManagersViewResponseRowThroughAncestorGroups contains permissions propagated from ancestor groups.

type GroupManagersViewResponseRowUser

type GroupManagersViewResponseRowUser struct {
	// Displayed only for users
	Login string `json:"login"`
	// Nullable; displayed only for users
	FirstName *string `json:"first_name"`
	// Nullable; displayed only for users
	LastName *string `json:"last_name"`
}

GroupManagersViewResponseRowUser contains names of a manager.

type ManagerPermissionsPart

type ManagerPermissionsPart struct {
	CurrentUserCanManageValue int `json:"-"`
	// returned only if the current user is a manager
	// enum: none,memberships,memberships_and_group
	CurrentUserCanManage string `json:"current_user_can_manage"`
	// returned only if the current user is a manager
	CurrentUserCanGrantGroupAccess bool `json:"current_user_can_grant_group_access"`
	// returned only if the current user is a manager
	CurrentUserCanWatchMembers bool `json:"current_user_can_watch_members"`
}

ManagerPermissionsPart contains fields related to permissions for managing the group. These fields are only displayed if the current user is a manager of the group. swagger:ignore

type Service

type Service struct {
	*service.Base
}

Service is the mount point for services related to `groups`.

func (*Service) SetRoutes

func (srv *Service) SetRoutes(router chi.Router)

SetRoutes defines the routes for this package in a route group.

type UserCountPart

type UserCountPart struct {
	// The number of descendant users (returned only if the current user is a manager)
	UserCount int32 `json:"user_count"`
}

UserCountPart contains the number of descendant users for a group. This field is only displayed if the current user is a manager of the group. swagger:ignore

Jump to

Keyboard shortcuts

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