zenphoto forums » General Zenphoto Discussion

Photo access rights based on image file IPTC tag

(4 posts)
  1. aviram

    Apprentice
    Joined: Jan '11
    Posts: 3

    How can define access rights or visibility based on IPTC/XMP tags previously embedded on JPEG files ?

    For example, if a new image provided to ZP is tagged as "private", set it visible only to the administrator. Or a file tagged as "confidential" will be visible only to users of group "A". Or, even further, only JPEGs taken with specific camera model will be accessible to user "B".

    I'd like to be able to define these rules but couldn't find any module that let me do that.

    I don't care about doing it directly on the DB (I can script that) but would like to have some advise or pointers on how to do that.

    Thanks in advance

    Posted 2 years ago #
  2. Zenphoto development team
    acrylian

    Developer
    Joined: Jul '07
    Posts: 13,368

    You have to do this on the theme directly as tags have no relation to our user rights management. Each theme item object has a class method to check for a tag:
    http://www.zenphoto.org/documentation/classes/ThemeObject.html#methodhasTag

    Then you could use this one to set the image unpublished:
    http://www.zenphoto.org/documentation/classes/ThemeObject.html#methodsetShow

    Note that this will most likely confuse your thumbnail pagination. So best you do check for this before actually displaying content on your theme.

    Don't forget to read the Forum rules and usage resources
    Posted 2 years ago #
  3. aviram

    Apprentice
    Joined: Jan '11
    Posts: 3

    These methods won't do exactly what I was thinking about. In my idea, single photo visibility or access permission (not just entire albums) should be calculated for each user visiting the site and not globally set the way setShow() does.

    Please confirm: apparently ZP user+group system controls only general access rights of the system as "can post comments" etc. You can assign this profile to root-level albums only, not to their sub-albums, not to single photos inside of them.

    Posted 2 years ago #
  4. Zenphoto development team
    sbillard

    Chief Developer
    Joined: May '07
    Posts: 9,771

    Zenphoto does not refine access rights to the image level, only the album level. For more details, please refer to the documentation on the Zenphoto site.

    Don't forget to read the Forum rules and usage resources
    Posted 2 years ago #

RSS feed for this topic

Reply

You must log in to post.