Using views data export module, I set the permission for different roles in the Data Export in Views like:
But I can still see the Export button for all users in front page. However if the role doesn’t have permission to export then after clicking it they are redirected to Access Denied Page
Is there any way I can hide the export button from all the user roles except the ones that have permission to export?
If it was a link defined in *.tpl.php then I could have done something like
<?php if (in_array('myRole', $user->roles)): ?> // The export button <?php endif; ?>
But I couldn’t figure out how to do it with Views Data Export (without hacking the module)