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:
parent
b845f52f64
commit
9b61dde7c8
5 changed files with 8 additions and 8 deletions
|
@ -21,7 +21,7 @@ import (
|
|||
|
||||
// manage actions that require admin-level permission go here
|
||||
|
||||
func RegisterAdminPages() {
|
||||
func registerAdminPages() {
|
||||
actions = append(actions,
|
||||
Action{
|
||||
ID: "cleanup",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -21,7 +21,7 @@ import (
|
|||
|
||||
// manage actions that require moderator-level permission go here
|
||||
|
||||
func RegisterModeratorPages() {
|
||||
func registerModeratorPages() {
|
||||
actions = append(actions,
|
||||
Action{
|
||||
ID: "bans",
|
||||
|
|
|
@ -60,7 +60,7 @@ var (
|
|||
}
|
||||
)
|
||||
|
||||
func RegisterNoPermPages() {
|
||||
func registerNoPermPages() {
|
||||
actions = append(actions, *loginAction,
|
||||
Action{
|
||||
ID: "staffinfo",
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue