flags

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package flags contains all the bitmask based flags used in the database.

Package flags contains all the bitmask based flags used in the database.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ACL

type ACL int32

ACL is a bitmask based flag for ACLs.

const (
	AclXchgmgrReview ACL = 1 << iota
	AclXchgmgrAdmin
	AclXmailchReview
	AclXmailchAdmin
	AclXhelp
	AclXhelpCanAdd
	AclXhelpCanEdit
	AclXwebaxs2
	AclXwebaxs3
	AclXwebctl
	AclXwebacl
	AclXwebusrToaster
	AclXatCanView
	AclXatCanEdit
	AclXdomainLock
	AclXsuspendUsr
	AclXunsuspendUsr
	AclXwebsess
	AclXcomplaintsAdmRead
	AclXcomplaintsAdmReply
	AclXloggingView
	AclXiprViewOwn
	AclXiprViewOthers
	AclXiprModOwn
	AclXiprModOthers
	AclXwebusrToasterRdonly
	AclMiaView
	AclXtotpDisableOthers
)

ACL flags.

func (*ACL) AddFlag

func (f *ACL) AddFlag(flag ACL)

AddFlag adds the flag.

func (*ACL) HasFlag

func (f *ACL) HasFlag(flag ACL) bool

HasFlag returns true if the flag is set.

func (*ACL) RemoveFlag

func (f *ACL) RemoveFlag(flag ACL)

RemoveFlag removes the flag.

func (*ACL) ToggleFlag

func (f *ACL) ToggleFlag(flag ACL)

ToggleFlag toggles the flag.

type User

type User int16

User is a bitmask based flag for users.

const (
	// UserGlobalSuspend indicates that the user is globally suspended
	UserGlobalSuspend User = 1 << iota
	// UserLoggedIn is deprecated
	UserLoggedIn
	// UserInvisible indicates that the user is invisible
	UserInvisible
	// UserFraud indicates that the username is fraud
	UserFraud
	// UserNoNotes indicates that the user do not want to be sent notes
	UserNoNotes
	// UserNoPurge do not remove the user for being idle
	UserNoPurge
	// UserNoAdmin indicates that any * authentication is disabled (verify/commands)
	UserNoAdmin
	// UserAlumni indicates that any * privileged is gone, *except* tg he verify; it is like an honorary position
	UserAlumni
	// UserOper indicates that the user is flagged as being an official operator, as for allowing them
	// special accesses such as posting complaints even when system is closed to public.
	UserOper
	// UserNoAdduser prevent anyone adding the username to channels (user-set flag, default disabled)
	UserNoAdduser
	// UserTotpEnabled indicates that TOTP is enabled for the user
	UserTotpEnabled
	// UserTotpAdminIpr indicates that the admin user has IP restrictions
	UserTotpAdminIpr
)

User flags.

func (*User) AddFlag

func (f *User) AddFlag(flag User)

AddFlag adds the flag.

func (*User) HasFlag

func (f *User) HasFlag(flag User) bool

HasFlag returns true if the flag is set.

func (*User) RemoveFlag

func (f *User) RemoveFlag(flag User)

RemoveFlag removes the flag.

func (*User) ToggleFlag

func (f *User) ToggleFlag(flag User)

ToggleFlag toggles the flag.

Jump to

Keyboard shortcuts

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