public function editGroup(int $groupId, array $post = []) : bool
{
if (\in_array($post['parent'], $this->getGroupChildren($groupId))) {
return false;
}
$this->db->beginTransaction();
$this->db->update('airship_groups', ['name' => $post['name'], 'inherits' => !empty($post['parent']) ? $post['parent'] : null, 'superuser' => !empty($post['superuser'])], ['groupid' => $groupId]);
return $this->db->commit();
}