protected function getGroupRulesForContextSave(array $actions, int $contextId) : array
{
$perms = [];
$groupIds = $this->db->first('SELECT DISTINCT groupid FROM airship_perm_rules WHERE context = ? AND groupid IS NOT NULL', $contextId);
foreach ($groupIds as $group) {
$allowed = $this->getGroupPerms((int) $group, $contextId);
foreach ($actions as $act) {
$perms[$group][$act] = \in_array($act, $allowed);
}
}
return $perms;
}