user

package
v1.66.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2018 License: AGPL-3.0 Imports: 25 Imported by: 20

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AttachUserAccounts

func AttachUserAccounts(ctx domain.RequestContext, s domain.Store, orgID string, u *user.User)

AttachUserAccounts attachs user accounts to user object.

func GetSecuredUser

func GetSecuredUser(ctx domain.RequestContext, s domain.Store, orgID, id string) (u user.User, err error)

GetSecuredUser contain associated accounts but credentials are wiped.

Types

type Handler

type Handler struct {
	Runtime *env.Runtime
	Store   *domain.Store
}

Handler contains the runtime information such as logging and database.

func (*Handler) Add

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

Add is the endpoint that enables an administrator to add a new user for their organization.

func (*Handler) BulkImport added in v1.58.0

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

BulkImport imports comma-delimited list of users: firstname, lastname, email

func (*Handler) ChangePassword

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

ChangePassword accepts password change from within the app.

func (*Handler) Delete

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

Delete is the endpoint to delete a user specified by userID, the caller must be an Administrator.

func (*Handler) ForgotPassword

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

ForgotPassword initiates the change password procedure. Generates a reset token and sends email to the user. User has to click link in email and then provide a new password.

func (*Handler) Get

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

Get returns user specified by ID

func (*Handler) GetOrganizationUsers

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

GetOrganizationUsers is the endpoint that allows administrators to view the users in their organization.

func (*Handler) GetSpaceUsers

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

GetSpaceUsers returns every user within a given space

func (*Handler) MatchUsers added in v1.58.0

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

MatchUsers returns users where provided text matches firstname, lastname, email

func (*Handler) ResetPassword

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

ResetPassword stores the newly chosen password for the user.

func (*Handler) Update

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

Update is the endpoint to update user information for the given userID. Note that unless they have admin privildges, a user can only update their own information. Also, only admins can update user roles in organisations.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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