1
0
Fork 0
mirror of https://github.com/Eggbertx/gochan.git synced 2025-09-13 09:26:23 -07:00

Make actino registration functions for individual staff roles private

This commit is contained in:
Eggbertx 2023-06-06 13:44:42 -07:00
parent b845f52f64
commit 9b61dde7c8
5 changed files with 8 additions and 8 deletions

View file

@ -21,7 +21,7 @@ import (
// manage actions that require admin-level permission go here
func RegisterAdminPages() {
func registerAdminPages() {
actions = append(actions,
Action{
ID: "cleanup",

View file

@ -18,7 +18,7 @@ import (
// manage actions that require at least janitor-level permission go here
func RegisterJanitorPages() {
func registerJanitorPages() {
actions = append(actions,
Action{
ID: "logout",

View file

@ -21,7 +21,7 @@ import (
// manage actions that require moderator-level permission go here
func RegisterModeratorPages() {
func registerModeratorPages() {
actions = append(actions,
Action{
ID: "bans",

View file

@ -60,7 +60,7 @@ var (
}
)
func RegisterNoPermPages() {
func registerNoPermPages() {
actions = append(actions, *loginAction,
Action{
ID: "staffinfo",

View file

@ -118,10 +118,10 @@ func GetStaffRank(request *http.Request) int {
func init() {
RegisterManagePage("actions", "Staff actions", JanitorPerms, AlwaysJSON, getStaffActions)
RegisterManagePage("dashboard", "Dashboard", JanitorPerms, NoJSON, dashboardCallback)
RegisterNoPermPages()
RegisterJanitorPages()
RegisterModeratorPages()
RegisterAdminPages()
registerNoPermPages()
registerJanitorPages()
registerModeratorPages()
registerAdminPages()
}
func dashboardCallback(_ http.ResponseWriter, _ *http.Request, staff *gcsql.Staff, _ bool, _ *zerolog.Event, errEv *zerolog.Event) (interface{}, error) {