forked from tildetown/town
parent
b5caa1355c
commit
c965c578bf
|
@ -7,7 +7,7 @@ import (
|
||||||
|
|
||||||
const adminGroup = "admin"
|
const adminGroup = "admin"
|
||||||
|
|
||||||
func IsAdmin(u user.User) (bool, error) {
|
func IsAdmin(u *user.User) (bool, error) {
|
||||||
adminGroup, err := user.LookupGroup(adminGroup)
|
adminGroup, err := user.LookupGroup(adminGroup)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return false, fmt.Errorf("failed to get admin group info: %w", err)
|
return false, fmt.Errorf("failed to get admin group info: %w", err)
|
||||||
|
|
Loading…
Reference in New Issue