forked from tildetown/town
parent
253825768b
commit
bd0fb8be77
4
town.go
4
town.go
|
@ -9,7 +9,7 @@ import (
|
|||
|
||||
const adminGroup = "admin"
|
||||
|
||||
func IsAdmin(u os.User) (bool, error) {
|
||||
func IsAdmin(u user.User) (bool, error) {
|
||||
adminGroup, err := user.LookupGroup(adminGroup)
|
||||
if err != nil {
|
||||
return false, fmt.Errorf("failed to get admin group info: %w", err)
|
||||
|
@ -34,7 +34,7 @@ func SendLocalEmail(username, subject, body string) error {
|
|||
cmd.Stdin = bytes.NewBufferString(body)
|
||||
|
||||
if err := cmd.Run(); err != nil {
|
||||
return fmt.Errof("failed to send local email: %w", err)
|
||||
return fmt.Errorf("failed to send local email: %w", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
|
Loading…
Reference in New Issue