For PDF Reader, How i can remove the download options for registered user?
Thanks.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

lfeche’s picture

Assigned: lfeche » Unassigned

For PDF Reader, How i can remove the download options for registered user?
Thanks.

Nitesh Pawar’s picture

Status: Reviewed & tested by the community » Active
Shreya Shetty’s picture

Assigned: Unassigned » Shreya Shetty
ankur.addweb’s picture

Patch attached. I have added a new permission called "Download PDF file". Using this you can control which user roles can download files.

ankur.addweb’s picture

Status: Active » Needs review
ankur.addweb’s picture

Version: 7.x-1.0-rc5 » 7.x-1.0-rc6
Nitesh Pawar’s picture

Status: Needs review » Needs work

Hi darshi ,

Thanks for your patch,
We are going to release PDF Reader 7.x-2.x soon, So please provide me patch for 7.x-2.x.

Thanks

Shreya Shetty’s picture

Assigned: Shreya Shetty » Unassigned
Status: Needs work » Needs review
FileSize
1.91 KB

I have provided the patch for the latest branch that is 7.x-2.x .Please review the patch.

krina.addweb’s picture

Hello,

#4 patch is works well for me.

Thanks,

Nitesh Pawar’s picture

@darshi please optimize you patch for 7.x-1.x

+       if (user_access('download pdf files')) {
+        $download_link = t('or') . ' ' . l(t('click here to download the PDF file.'), $file_url);
+      }
+      else {
+        $download_link = '';
+      }
+        $download_link = '';
+       if (user_access('download pdf files')) {
+        $download_link = t('or') . ' ' . l(t('click here to download the PDF file.'), $file_url);
+      }

@shreya Thank for your patch for 7.x-2.x.

Shreya Shetty’s picture

I have optimized the code and provided the patch as well as interdiff . Kindly review the patch

Shreya Shetty’s picture

Nitesh Pawar’s picture

Status: Needs review » Fixed

Thanks

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.