Skip to content
Commits on Source (2)
...@@ -271,11 +271,7 @@ class group implements Interfaces\Api ...@@ -271,11 +271,7 @@ class group implements Interfaces\Api
return Factory::response([]); return Factory::response([]);
} }
$canDelete = Session::isAdmin(); $canDelete = Session::isAdmin() || $group->isCreator($user);
if (!$canDelete && $group->isCreator($user)) {
$canDelete = $group->getMembersCount() <= 1;
}
if (!$canDelete) { if (!$canDelete) {
return Factory::response([ return Factory::response([
......