admin

package
v2.0.6 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2021 License: MIT Imports: 25 Imported by: 0

Documentation

Overview

Package admin implements the dashboard for admins and moderators to change and control aspects of the room. Including aliases, allow/deny list managment, invites and settings of the room.

Index

Constants

This section is empty.

Variables

View Source
var HTMLTemplates = []string{
	"admin/dashboard.tmpl",
	"admin/menu.tmpl",

	"admin/settings.tmpl",

	"admin/aliases-revoke-confirm.tmpl",

	"admin/denied-keys.tmpl",
	"admin/denied-keys-remove-confirm.tmpl",

	"admin/invite-list.tmpl",
	"admin/invite-revoke-confirm.tmpl",
	"admin/invite-created.tmpl",

	"admin/notice-edit.tmpl",

	"admin/member.tmpl",
	"admin/member-list.tmpl",
	"admin/members-remove-confirm.tmpl",
	"admin/members-show-password-reset-token.tmpl",
}

HTMLTemplates define the list of files the template system should load.

Functions

func Handler

func Handler(
	netInfo network.ServerEndpointDetails,
	r *render.Renderer,
	roomState *roomstate.Manager,
	fh *weberrors.FlashHelper,
	locHelper *i18n.Helper,
	dbs Databases,
) http.Handler

Handler supplies the elevated access pages to known users. It is not registering on the mux router like other pages to clean up the authorize flow.

Types

type Databases

type Databases struct {
	Aliases       roomdb.AliasesService
	AuthFallback  roomdb.AuthFallbackService
	Config        roomdb.RoomConfig
	DeniedKeys    roomdb.DeniedKeysService
	Invites       roomdb.InvitesService
	Notices       roomdb.NoticesService
	Members       roomdb.MembersService
	PinnedNotices roomdb.PinnedNoticesService
}

Databases is an option struct that encapsulates the required database services

Jump to

Keyboard shortcuts

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