users

package
v0.0.0-...-19dec9d Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AuthCookieName = "dialpad_history_user_id"
	Admins         map[string]Entry
	Readers        map[string]Entry
)
View Source
var (
	UsageStats = middleware.StatMap("usage-status")
)

Functions

func CheckAuth

func CheckAuth(userId, capability string) string

func CheckLoginMiddleware

func CheckLoginMiddleware(c *gin.Context)

func CompareEntries

func CompareEntries(e1, e2 Entry) int

func ExportUsers

func ExportUsers(entries []Entry, path string) error

func ListUsers

func ListUsers(capability string) map[string]Entry

func LoadUsers

func LoadUsers() error

LoadUsers loads the users list from AWS.

SuperAdmins in Dialpad become admins in this server. Every user becomes a reader in this server.

func LoginForm

func LoginForm(message, next string) []byte

func LoginHandler

func LoginHandler(c *gin.Context)

func LoginSuccessForm

func LoginSuccessForm(next string) []byte

func LogoutHandler

func LogoutHandler(c *gin.Context)

func UploadUsersList

func UploadUsersList(entries []Entry) error

Types

type Entry

type Entry struct {
	Id           string   `json:"id"`
	Emails       []string `json:"emails"`
	FirstName    string   `json:"first_name"`
	LastName     string   `json:"last_name"`
	IsAdmin      bool     `json:"is_admin"`
	IsSuperAdmin bool     `json:"is_super_admin"`
}

func DownloadUsersList

func DownloadUsersList() ([]Entry, error)

func FetchDialpadUsers

func FetchDialpadUsers() ([]Entry, error)

Jump to

Keyboard shortcuts

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