Airship\Cabin\Bridge\Blueprint\Permissions::getUserPerms PHP Method

getUserPerms() public method

public getUserPerms ( integer $userId, integer $contextId ) : array
$userId integer
$contextId integer
return array
    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;
    }