<?php

/**
 * Has the user the permission?
 *
 * @param $permission - name of the permission
 * @param $ruleset
 */

QUI::getAjax()->registerFunction(
    'ajax_permissions_session_getPermission',
    static function ($permission, $ruleset) {
        return QUI::getUserBySession()->getPermission($permission, $ruleset);
    },
    ['permission', 'ruleset']
);
