4

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)

0

This issue has been fixed in the 7.x-3.0-beta8 version. See the issue thread here.

-1

Add a template for the view. Then by using css, hide the default export button coming with view. Then print the export link manually based on user role.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy