Skip to content

New feature added: Access code for category #12

@alve89

Description

@alve89

Hi Jan,

I added a new feature to the latest release (6.0.1): A configurable secret per category.

If this secret (= access code) is set for a specific category, a user needs to enter this access code to view the category's content in the frontend. This can be used in two ways:

UPDATE:

  1. If the category grants access via ACL, the content is accessible without entering a secret.
  2. If ACL does not grant access and a secret is set, the content is accessible only after entering the correct secret.
  3. If neither ACL access nor a valid secret is present, access is denied.

This enables sharing photos without the problem of automated indenxing by bots (at least through the UI - of course the photos could be accessed directly by /images/phocagallery/...) - just give the wanted users the secret and they can view the photos - without the need of registration. My purpose was to share Christmas familiy photos in a nice gallery without pubishing them to the internet (and my Nextcloud sharing has a bug currently, so I chose this way).

I hope this is interesting for you and you can implement it in any of the next versions. I added translation, update migration, ... for a future version 6.1.0.

Additionally I added a configurable option if the user should be redirected to a login page (as it is in the latest version but which is contradictory to my no-registration-needed approach) or an 403 error message should be displayed.

If you have questions about it, let me know.

Best regards
Stefan

com_phocagallery_feature_secret.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions