Just for your know.
I made my own fix in the shorcode template.
$userNotAllowed = false; // default
if(isset($_GET['wpdmc'])){
$categoryId = get_term_by('slug', $_GET['wpdmc'], 'wpdmcategory')->term_id;
$permittedFor = WPDM\libs\CategoryHandler::GetAllowedRoles($categoryId);
$userNotAllowed = true;// block for now
foreach($permittedFor as $roleWhoCan)
{
if($roleWhoCan == 'guest' || current_user_can($roleWhoCan)){
$userNotAllowed = false;
}
}
}
Than a wrapped the ‘while’ statement with if(! $userNotAllowed) and blocked the query is not allowed.
BUT, as the control is made by file level, the category restriction seems without purpose.
What context the category restriction works?