mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-05 05:50:19 +08:00
Improve error text in RequireAdmin()
This commit is contained in:
@ -129,6 +129,7 @@ func (c *ApiController) RequireAdmin() (string, bool) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if !user.IsAdmin {
|
if !user.IsAdmin {
|
||||||
|
c.ResponseError(c.T("general:this operation requires administrator to perform"))
|
||||||
return "", false
|
return "", false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user