projects
/
prosody.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
119830d
)
MUC: Prevent admins from being given affiliatons other than owner
author
Kim Alvefur
<zash@zash.se>
Thu, 25 Jun 2015 15:58:24 +0000
(17:58 +0200)
committer
Kim Alvefur
<zash@zash.se>
Thu, 25 Jun 2015 15:58:24 +0000
(17:58 +0200)
plugins/muc/mod_muc.lua
patch
|
blob
|
history
diff --git
a/plugins/muc/mod_muc.lua
b/plugins/muc/mod_muc.lua
index 6e86ab730d0451c6369995edc1ecee78543f8619..acc2da0d7c040beb1c66ec3b7aa2c11ba3aa4c3e 100644
(file)
--- a/
plugins/muc/mod_muc.lua
+++ b/
plugins/muc/mod_muc.lua
@@
-51,7
+51,7
@@
function muclib.room_mt:get_affiliation(jid)
return _get_affiliation(self, jid);
end
function muclib.room_mt:set_affiliation(actor, jid, affiliation, callback, reason)
- if is_admin(jid) then return nil, "modify", "not-acceptable"; end
+ if
affiliation ~= "owner" and
is_admin(jid) then return nil, "modify", "not-acceptable"; end
return _set_affiliation(self, actor, jid, affiliation, callback, reason);
end