Zodan Authorized Downloads

설명

This plugin allows site admins to protect specific attachment file types (e.g. Pdf, Doc(x)) from direct access. Instead, the files are served through WordPress, allowing you to check if a user is logged in or has the required permissions before granting access.

Features:
* Adds a checkbox to media attachments to mark them as “Authorized only”.
* Creates an internal page and rewrite rules to intercept requests to protected file types.
* Checks user login status (or other custom logic you add) before serving files.
* Provides a settings page to specify which file types should be protected.

License

This plugin is licensed under GPLv2 or later.

스크린샷

  • Settings page where you define protected file types and user roles.
  • Media modal showing the “Authorized only” checkbox.

설치

  1. Upload the plugin files to /wp-content/plugins/z-authorized-downloads/ or install via the Plugins screen.
  2. Activate the plugin through the ‘Plugins’ screen.
  3. Go to Settings Authorized Downloads to set which file types should be protected and which roles can download protected files
  4. Mark attachments as “Authorized only” in the Media Library to restrict access.
  5. Optionally, override the default permitted roles per attachment in the Media Library.

FAQ

Can I customize the authorization logic?

Yes. The plugin checks if the user is logged in by default, but you can extend handle_protected_request() to add role checks or other conditions.

What happens to unprotected files?

Files that are not marked as “Authorized only” will still be directly accessible by URL.

Do I need to manually edit .htaccess?

No. The plugin will manage the .htaccess rules for you when you save settings.

Do you have plans to improve the plugin?

We currently have on our roadmap:
* Make the plugin pluggable – adding hooks for certain checks.
* Adding a custom capability to manage which users can edit settings (both general and per file).
* Adding more translations.

If you have a feature suggestion, send us an email at plugins@zodan.nl.

후기

이 플러그인에 대한 평가가 없습니다.

기여자 & 개발자

“Zodan Authorized Downloads”(은)는 오픈 소스 소프트웨어입니다. 다음의 사람들이 이 플러그인에 기여하였습니다.

기여자

“Zodan Authorized Downloads”(이)가 1 개 언어로 번역되었습니다. 기여해 주셔서 번역자님께 감사드립니다.

자국어로 “Zodan Authorized Downloads”(을)를 번역하세요.

개발에 관심이 있으십니까?

코드 탐색하기는, SVN 저장소를 확인하시거나, 개발 기록RSS로 구독하세요.

변경이력

1.2.7

  • Fixed typo 🙄

1.2.6

  • Renamed plugin to Zodan Authorized Downloads.

1.2.5

  • Protected file are now visibly marked in the Media Library.
  • Added download log.

1.2.4

  • Updated sanitizing method for array of $_POST values to satisfy plugin check.

1.2.3

  • Added help text on the settings page.
  • Added some screenshots.

1.2.2

  • Small adjustments to the rendering of the meta fields to have both versions (meta-box and modal) use the same code.

1.2.1

  • Fixed Bug in handling the meta-box update function where changes were not saved correctly.

1.2.0

  • Renamed plugin to Z Authorized Downloads.
  • Added default Allowed roles to download files.
  • Added file-specific Allowed roles to the media file meta-box.

1.1.1

  • Added settings page for specifying protected file types.
  • Improved security: uses WP_Filesystem for file reads.
  • Added caching to database lookups for performance.

1.0.0

  • Initial release with meta box and basic rewrite rules.