flags

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 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 (
	ACL_XCHGMGR_REVIEW ACL = 1 << iota
	ACL_XCHGMGR_ADMIN
	ACL_XMAILCH_REVIEW
	ACL_XMAILCH_ADMIN
	ACL_XHELP
	ACL_XHELP_CAN_ADD
	ACL_XHELP_CAN_EDIT
	ACL_XWEBAXS_2
	ACL_XWEBAXS_3
	ACL_XWEBCTL
	ACL_XWEBACL
	ACL_XWEBUSR_TOASTER
	ACL_XAT_CAN_VIEW
	ACL_XAT_CAN_EDIT
	ACL_XDOMAIN_LOCK
	ACL_XSUSPEND_USR
	ACL_XUNSUSPEND_USR
	ACL_XWEBSESS
	ACL_XCOMPLAINTS_ADM_READ
	ACL_XCOMPLAINTS_ADM_REPLY
	ACL_XLOGGING_VIEW
	ACL_XIPR_VIEW_OWN
	ACL_XIPR_VIEW_OTHERS
	ACL_XIPR_MOD_OWN
	ACL_XIPR_MOD_OTHERS
	ACL_XWEBUSR_TOASTER_RDONLY
	ACL_MIA_VIEW
	ACL_XTOTP_DISABLE_OTHERS77
)

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 (
	// USER_TOTP_ENABLED indicates that TOTP is enabled for the user
	USER_TOTP_ENABLED User = 1024
	// USER_TOTP_ADMIN_IPR indicates that the admin user has IP restrictions
	USER_TOTP_ADMIN_IPR User = 2048
)

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