mirror of
https://github.com/directorz/mailfull-go.git
synced 2025-12-18 10:07:03 +00:00
Disable to delete postmaster #14
This commit is contained in:
@@ -59,6 +59,11 @@ func (c *UserDelCommand) Run(args []string) int {
|
|||||||
return 1
|
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 {
|
if err := repo.UserRemove(domainName, userName); err != nil {
|
||||||
fmt.Fprintf(c.UI.ErrorWriter, "[ERR] %v\n", err)
|
fmt.Fprintf(c.UI.ErrorWriter, "[ERR] %v\n", err)
|
||||||
return 1
|
return 1
|
||||||
|
|||||||
Reference in New Issue
Block a user