Documentation ¶
Index ¶
- Variables
- type Account
- func (a Account) CanActivateTOTP(userID string) bool
- func (a Account) CanActivateUsers() bool
- func (a Account) CanAssignSuperRole(userID string) bool
- func (a Account) CanChangePassword(userID string) bool
- func (a Account) CanChangeRoles(userID string) bool
- func (a Account) CanChangeTOTPTel(userID string) bool
- func (a Account) CanChoosePassword(userID string) bool
- func (a Account) CanCreateRoles() bool
- func (a Account) CanDeleteRoles() bool
- func (a Account) CanDisableTOTP(userID string) bool
- func (a Account) CanInviteUsers() bool
- func (a Account) CanRegenerateRecoveryCodes(userID string) bool
- func (a Account) CanResetPassword(userID string) bool
- func (a Account) CanResetTOTP(userID string) bool
- func (a Account) CanReviewTOTPResets() bool
- func (a Account) CanSetupTOTP(userID string) bool
- func (a Account) CanSuspendUsers() bool
- func (a Account) CanUnsuspendUsers() bool
- func (a Account) CanUpdateRoles() bool
- func (a Account) CanVerifyTOTP(userID string) bool
- func (a Account) CanViewRoles() bool
- func (a Account) CanViewUsers() bool
- type Passport
- type Permission
- type PermissionGroup
- type System
Constants ¶
This section is empty.
Variables ¶
View Source
var PermissionGroups = []PermissionGroup{ { Name: "Account roles", Permissions: []Permission{ {DisplayName: "View roles", Name: viewRoles}, {DisplayName: "Create roles", Name: createRoles}, {DisplayName: "Edit roles", Name: updateRoles}, {DisplayName: "Delete roles", Name: deleteRoles}, }, }, { Name: "Account users", Permissions: []Permission{ {DisplayName: "View users", Name: viewUsers}, {DisplayName: "Invite users", Name: inviteUsers}, {DisplayName: "Activate users", Name: activateUsers}, {DisplayName: "Change user roles", Name: changeRoles}, {DisplayName: "Review 2FA resets", Name: reviewTOTPResets}, {DisplayName: "Suspend users", Name: suspendUsers}, {DisplayName: "Unsuspend users", Name: unsuspendUsers}, }, }, { Name: "System", Permissions: []Permission{ {DisplayName: "View system config", Name: viewConfig}, {DisplayName: "Edit system config", Name: updateConfig}, }, }, }
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct {
*Passport
}
func (Account) CanActivateTOTP ¶
func (Account) CanActivateUsers ¶
func (Account) CanAssignSuperRole ¶
func (Account) CanChangePassword ¶
func (Account) CanChangeRoles ¶
func (Account) CanChangeTOTPTel ¶
func (Account) CanChoosePassword ¶
func (Account) CanCreateRoles ¶
func (Account) CanDeleteRoles ¶
func (Account) CanDisableTOTP ¶
func (Account) CanInviteUsers ¶
func (Account) CanRegenerateRecoveryCodes ¶
func (Account) CanResetPassword ¶
func (Account) CanResetTOTP ¶
func (Account) CanReviewTOTPResets ¶
func (Account) CanSetupTOTP ¶
func (Account) CanSuspendUsers ¶
func (Account) CanUnsuspendUsers ¶
func (Account) CanUpdateRoles ¶
func (Account) CanVerifyTOTP ¶
func (Account) CanViewRoles ¶
func (Account) CanViewUsers ¶
type Passport ¶
type Passport struct { UserID string IsSuper bool Permissions []string Account Account System System }
func (Passport) CanAccessAdmin ¶
type Permission ¶
type PermissionGroup ¶
type PermissionGroup struct { Name string Permissions []Permission }
type System ¶
type System struct {
*Passport
}
func (System) CanUpdateConfig ¶
func (System) CanViewConfig ¶
func (System) CanViewMetrics ¶
Click to show internal directories.
Click to hide internal directories.