forked from rDrama/rDrama
disallow mods from kicking other mods
parent
ae728b9434
commit
8ba3178c1c
|
@ -185,6 +185,9 @@ def group_reject(v, group_name, user_id):
|
||||||
if not membership:
|
if not membership:
|
||||||
abort(404, "There is no membership to reject!")
|
abort(404, "There is no membership to reject!")
|
||||||
|
|
||||||
|
if v.id != group.owner.id and membership.is_mod:
|
||||||
|
abort(403, "Only the group owner can kick mods!")
|
||||||
|
|
||||||
if v.id == membership.user_id:
|
if v.id == membership.user_id:
|
||||||
msg = f"You have left !{group} successfully!"
|
msg = f"You have left !{group} successfully!"
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue