mirror of
https://github.com/jech/galene.git
synced 2024-11-09 18:25:58 +01:00
Enforce clearchat permissions in the server.
It was only being enforced in the client.
This commit is contained in:
parent
e59880e267
commit
ea4f14ee0a
1 changed files with 3 additions and 0 deletions
|
@ -1619,6 +1619,9 @@ func handleClientMessage(c *webClient, m clientMessage) error {
|
||||||
}
|
}
|
||||||
switch m.Kind {
|
switch m.Kind {
|
||||||
case "clearchat":
|
case "clearchat":
|
||||||
|
if !member("op", c.permissions) {
|
||||||
|
return c.error(group.UserError("not authorised"))
|
||||||
|
}
|
||||||
g.ClearChatHistory()
|
g.ClearChatHistory()
|
||||||
m := clientMessage{
|
m := clientMessage{
|
||||||
Type: "usermessage",
|
Type: "usermessage",
|
||||||
|
|
Loading…
Reference in a new issue