users

package
v2.13.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Groups

type Groups struct {
	Groups []string `json:"groups" xml:"groups>element"`
}

Groups holds group data

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

Handler renders user data for the user id given in the url path

func (*Handler) GetGroups

func (h *Handler) GetGroups(w http.ResponseWriter, r *http.Request)

GetGroups handles GET requests on /cloud/users/groups TODO: implement

func (*Handler) GetUsers

func (h *Handler) GetUsers(w http.ResponseWriter, r *http.Request)

GetUsers handles GET requests on /cloud/users Only allow self-read currently. TODO: List Users and Get on other users (both require administrative privileges)

func (*Handler) Init

func (h *Handler) Init(c *config.Config)

Init initializes this and any contained handlers

type Quota

type Quota struct {
	Free       int64   `json:"free,omitempty" xml:"free,omitempty"`
	Used       int64   `json:"used,omitempty" xml:"used,omitempty"`
	Total      int64   `json:"total,omitempty" xml:"total,omitempty"`
	Relative   float32 `json:"relative,omitempty" xml:"relative,omitempty"`
	Definition string  `json:"definition,omitempty" xml:"definition,omitempty"`
}

Quota holds quota information

type User added in v2.4.0

type User struct {
	Enabled     string `json:"enabled" xml:"enabled"`
	Quota       *Quota `json:"quota,omitempty" xml:"quota,omitempty"`
	Email       string `json:"email" xml:"email"`
	DisplayName string `json:"displayname" xml:"displayname"` // is used in ocs/v(1|2).php/cloud/users/{username} - yes this is different from the /user endpoint
	UserType    string `json:"user-type" xml:"user-type"`
	UIDNumber   int64  `json:"uidnumber,omitempty" xml:"uidnumber,omitempty"`
	GIDNumber   int64  `json:"gidnumber,omitempty" xml:"gidnumber,omitempty"`
	// FIXME home should never be exposed ... even in oc 10, well only the admin can call this endpoint ...
	// Home                 string `json:"home" xml:"home"`
	TwoFactorAuthEnabled bool  `json:"two_factor_auth_enabled" xml:"two_factor_auth_enabled"`
	LastLogin            int64 `json:"last_login" xml:"last_login"`
}

User holds user data

Jump to

Keyboard shortcuts

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