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

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
nilesh.addweb’s picture

StatusFileSize
new1.99 KB

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

nilesh.addweb’s picture

Status: Active » Needs review
nilesh.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
StatusFileSize
new1.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

StatusFileSize
new1.97 KB

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.