Quantcast
Channel: Active questions tagged users - Drupal Answers
Viewing all articles
Browse latest Browse all 472

How to set Permission based on roles for Views Data Export

$
0
0

Using views data export module, I set the permission for different roles in the Data Export in Views like:

enter image description here

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)


Viewing all articles
Browse latest Browse all 472

Trending Articles