1
0
mirror of https://github.com/directorz/mailfull-go.git synced 2025-12-17 17:47:04 +00:00

Disable to delete postmaster #14

This commit is contained in:
teru
2016-08-18 19:23:27 +09:00
parent bd6228197a
commit fe16bb86f9

View File

@@ -59,6 +59,11 @@ func (c *UserDelCommand) Run(args []string) int {
return 1
}
if userName == "postmaster" {
fmt.Fprintf(c.UI.ErrorWriter, "[ERR] Cannot delete postmaster.\n")
return 1
}
if err := repo.UserRemove(domainName, userName); err != nil {
fmt.Fprintf(c.UI.ErrorWriter, "[ERR] %v\n", err)
return 1