public function getUserPerms(int $userId, int $contextId) : array
{
$perms = $this->db->first(' SELECT a.label FROM airship_perm_rules r ' . ' LEFT JOIN airship_perm_actions a ON r.action = a.actionid ' . ' WHERE r.context = ? AND r.userid = ?', $contextId, $userId);
if (empty($perms)) {
return [];
}
return $perms;
}