user

package
v1.65.1 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2018 License: AGPL-3.0 Imports: 4 Imported by: 32

Documentation

Index

Constants

View Source
const (
	// EveryoneUserID provides a shortcut to state "all authenticated users".
	EveryoneUserID string = "0"

	// EveryoneUserName provides the descriptor for this type of user/group.
	EveryoneUserName string = "Everyone"
)

Variables

This section is empty.

Functions

func Exists added in v1.56.0

func Exists(users []User, userID string) bool

Exists ehecks if user is in array.

Types

type User

type User struct {
	model.BaseEntity
	Firstname   string            `json:"firstname"`
	Lastname    string            `json:"lastname"`
	Email       string            `json:"email"`
	Initials    string            `json:"initials"`
	Active      bool              `json:"active"`
	Editor      bool              `json:"editor"`
	Admin       bool              `json:"admin"`
	ViewUsers   bool              `json:"viewUsers"`
	Analytics   bool              `json:"analytics"`
	Global      bool              `json:"global"`
	Password    string            `json:"-"`
	Salt        string            `json:"-"`
	Reset       string            `json:"-"`
	LastVersion string            `json:"lastVersion"`
	Accounts    []account.Account `json:"accounts"`
	Groups      []group.Record    `json:"groups"`
}

User defines a login.

func (*User) Fullname

func (user *User) Fullname() string

Fullname returns Firstname + Lastname.

func (*User) GetAccount

func (user *User) GetAccount(orgID string) (a account.Account, found bool)

GetAccount returns matching org account using orgID

func (*User) ProtectSecrets

func (user *User) ProtectSecrets()

ProtectSecrets blanks sensitive data.

Jump to

Keyboard shortcuts

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