1.4.2 change in user right management

Hi,

After switching to the 1.4.2 development branch, I've found out that the handling of user rights regarding unpublished items is different now. After assuming this was a bug (ticket in trac: http://www.zenphoto.org/trac/ticket/2014 ), it now seems like this is intended behaviour.

Previously (1.4.1.x branch), I could do the following:
- Give specific users the right to view unpublished items in a specific album tree without giving them editing right to said tree. I use this for family with a login who I'd like to allow to browse all my unpublished albums
- Send an album links to friends who don't have a login to view published images in an unpublished album, without them being able to browse the entire album tree
- Give edit/upload rights to album trees of their owners, so they can add new photos

With the 1.4.2, I no longer can give the right to users to view unpublished items in a specific album tree, without also giving them edit permissions! This is a major problem for my above described Zenphoto usage.

Can someone also explain what the improvement of 1.4.2 is over 1.4.1.x in this regard? Previously you could untick the 'view unpublished images' box in a specific user's album rights to prevent them from seeing unpublished images. Now this box is gone and I interpret its function having merged with the edit rights! How is this exactly not a regression in control of user rights?

Comments

  • Why don't you just password protect the albums you do not want outsiders to see? You can give your family rights to these albums without giving them edit rights (which it sounds like you have done anyway.)

    BTW, the 1.4.1 branch did not really work. That was part of what prompted the change.
  • I can't use content-passwords, as I don't want to control access on a per-content basis, but on a per-user basis (using accounts with different rights).

    Like I explained in my last post, I'd like to give friends access to a single web-album without requiring passwords to view them, by giving them the direct link. My family however can see all the albums in a tree, but I don't want them to edit the tree; hence I give them viewing rights; Previously this worked fine with setting the 'view unpublished images' right. Not any more since the 1.4.2 branch.

    Why was this fine grained access control removed in the 1.4.2 branch? It's a huge loss of functionality in my opinion.
  • acrylian Administrator, Developer
    You can still unpublish any item and just sent the direct link to make people see them.

    The unpublished items are not shown on the website itself unless you have administration rights. This was added on user request if I am not mistaken but my collegue will have the exact info.
  • Unless someone else steps in, it would seem you are the only one missing this. Not sufficient demand to warrant development effort.
  • @acrylian:
    like you said, I can send the direct link of unpublished items to friends, and indeed, that's part of how I use Zenphoto. What Zenphoto 1.4.1.x allowed me to do is give relatives 'viewing rights' to my album to browse my unpublished albums without giving guests (with no accounts) this ability nor giving my relatives editing rights to my album.

    I'm still at a complete loss why you've removed the 'view unpublished images' access right. What did its presence prevent people from doing? If people wanted others to only view unpublished items if they had editing right, they could always enable/disable edit rights at the same time as 'view unpublished images'. What does the changed behaviour in 1.4.2 (removal of 'view unpublished images', effects merged with editing rights) fix or add? From what I see it only removes very useful access control! Please explain why it was removed, as I'm saddened and disappointed by the lack of this option in 1.4.2.

    Further more, I'm not the only one suffering as user 'pumrum' posted the initial ticket for this issue. I hope you will reconsider your decision if people in future ask for this (thee days reaction time on changed behaviour in a development branch that knows no stable releases does not constitute 'reasonable time' in my opinion).
  • @acrylian:
    like you said, I can send the direct link of unpublished items to friends, and indeed, that's part of how I use Zenphoto. What Zenphoto 1.4.1.x allowed me to do is give relatives 'viewing rights' to my album to browse my unpublished albums without giving guests (with no accounts) this ability nor giving my relatives editing rights to my album.

    I'm still at a complete loss why you've removed the 'view unpublished images' access right. What did its presence prevent people from doing? If people wanted others to only view unpublished items if they had editing right, they could always enable/disable edit rights at the same time as 'view unpublished images'. What does the changed behaviour in 1.4.2 (removal of 'view unpublished images', effects merged with editing rights) fix or add? From what I see it only removes very useful access control! Please explain why it was removed, as I'm saddened and disappointed by the lack of this option in 1.4.2.

    Further more, I'm not the only one suffering as user 'pumrum' posted the initial ticket for this issue. I hope you will reconsider your decision if people in future ask for this (three days reaction time on changed behaviour in a development branch that knows no stable releases does not constitute 'reasonable time' in my opinion).
  • Sorry you feel that way.

    But let me point out that the Development branch has been around much more than three days. If you want your input to get in in time to influence things you will need to be trying the development build more often.

    The feature was removed as being not worth the cost of the implementation.

    'pumrum' simply did not (and apparently still does not) understand the "view" right. He seemed to think that the "view" rights had to do with unpublished items. That was never the case. I'm guessing he did not read
    View album rights: Allows the user to view all albums. Without this right, the user can view only public ones and those checked in his managed object lists.
    It was only an artifact that all "users" were originally able to view unpublished items that one might have interpreted that right accodingly. It was this very behavior that was removed as documented in the release notes.

    You may well say that the writing is not clear. But understand that we write based on our understandings, it is impossible to put our perspective to that of a naive user. We have often solicited someone with a user perspective to write a user guide, but I guess that is not something that will happen.

    As to your request. That does not seem what ticket 2014 was about, so you still stand unique unless someone else jumps in.
  • acrylian Administrator, Developer
    (thee days reaction time on changed behaviour in a development branch that knows no stable releases does not constitute 'reasonable time' in my opinion).
    One short comment to this: Please consider we are a small team and volunteers and sometimes we have other things to do so it sometimes may take some time until we respond. I think we are pretty fast responding compared with other projects anyway.
  • @acrylian, @sbillard: the development branch has been around for longer, but most users of Zenphoto will be exposed to it when it reaches a stable release. In software development this is generally the time when most of the feedback on changed behaviour and 'removed features' will occur. As for my specific case: I have only started considering Zenphoto as a platform for my project since very recently. The 'three days reaction time' was a reference to finalising a decision within three days of a single user reporting it; not to the time taken to respond to my issue.

    @sbillard: "The feature was removed as being not worth the cost of the implementation.". I'm sorry to hear that this causes difficulty to carry over into a new branch of Zenphoto; I do think that it is indispensable for user-based access rights rather than content-based access rights in anything but the most simple of setups. This is something that will be obvious when the 1.4.2.x branch hits a stable release.

    Further more: concluding that pumrum's issue does not coincide with mine requires the assumption that he's not familiar with the behaviour in 1.4.1.x regarding unpublished items in exactly the setup he is describing in his trac issue, and in addition to this, that he does not mind the loss of this feature which effect he is considering as a bug. I'll respectfully beg to differ on both accounts. A safer assumption, until pumrum delights us with a clarification on his trac, is that he wants either the ability to control the right for users to view unpublished items in a managed album (like in 1.4.1.x branch), or that he would expect it to be merged with the 'view' option rather than the 'edit' option. As the latter conflicts with other usage scenarios, I'd give preference to retaining the 1.4.1.x fine-grained control.

    And I'd like to reiterate what I said in my trac post: I'm here to state the effects on a usage scenario from a loss of a function in a development branch compared to the currently released branch. I'm not here to make enemies nor friends; I have no interest in politics.
  • acrylian Administrator, Developer
    Ok, I missunderstood the "three days" part. Please don't get us wrong, you don't have to justify if you don't like something. Any request is valid even if we don't agree. That does not make "enemies" overhere.

    I have to leave the proper answer to my collegue who does all the user rights stuff I am not even really familiar with code wise.
  • I just switched from 1.4.1.6 to 1.4.2 RC1. What Frank mentioned is exactly what I need:

    - Give specific users the right to view unpublished items in a specific album tree without giving them editing right to said tree. I use this for family with a login who I'd like to allow to browse all my unpublished albums

    I have many sub-albums in the state of "unpublished". I need to give specific users the right to browse these albums without the right of editing. These albums should be discoverable to these specific logged-on users, so that I do not need to send them URLs. That is, once logged in, all unpublished albums appear as published to these uses.

    At this point, I guess I can to try to switch back to 1.4.1.x. However, I want to commit to ZenPhoto (which is really great!) for long term. This is an essential functionality I need. Do you plan to continue have it for future releases?

    Thanks very much!
  • From http://www.zenphoto.org/index.php?p=news&title=zenphoto-1.4.2

    We have found that our users need two kinds of users: Ones that manage all or part of the site and ones that are "customers" of the site. For the latter, it was not desirable that they be shown unpublished items in menus.

    I think the third kind of users is needed -- Ones that are special customers, who should not have right to edit, but should have been able to see unpublished items (I'm OK with them to see all unpublished items. If there could be fine-grain controls, it would be even better but not necessary.).
  • I'd argue that the behaviour of 'view' rights could be tied to something as simple as whether the site is 'public' or 'private'.

    When it is set to public, you can already see all published items. In that case, it makes sense having 'view' right assigned to 'see unpublished items'. This would allow the user-based access management.

    In 'private' mode, you want a type of user that can not see unpublished items (as indicated by the 'customer' type).

    Right now, there's no reason to run a 'public' site and have the 'view' option for users without edit rights, as it changes naught to the allowed behaviour of said user.
  • In 1.4.2, a user can be assigned to manage an album without the rights editing it. At the beginning, I assumed this could achieve what I need -- see the unpublished sub-albums within that album without the editing rights. Then I realized it did not. I'm still confused on what this configuration offers.
  • I really do not think that option behavior should change depending on other option behavior. How would anyone ever get it straight?

    Published vs. not published has almost always been the mechanism to keep from showing things "until they were ready" Pretty much the definition of the term. You seem to want to use it as a kind of security feature.

    http://www.zenphoto.org/news/an-overview-of-zenphoto-users is the required reading for this topic.
    View album rights: Allows the user to view all albums. Without this right, the user can view only public ones and those checked in his managed object lists.

    Granted a private gallery has no "public" albums in the full sense of the word. However it may have semi-public albums--that is ones which are viewable by all users regardless of their rights. An administrator may want to have users view all albums but have management rights only to a handful. It would be really excessive to make him mark each and every album in each and every user's managed album list, so the `View" right makes sense.

    We believe that the viewability of unpublished items should be restricted to those that manage them (and of course, anyone who has been given the link.) We do not see it as a security feature--that is left to the user rights/guest password realm.

    But you really can do what you want anyway. Remember that Zenphoto is object oriented. The getAlbums() and getImages() methods have a parameter that overrides the protection letting you retrieve unpublished items if you wish.

    I have retrofit a v1.4.3 change to the 1.4.2 Release Candidate that will allow you to provide this parameter via the Template-functions `next_album()` and `next_image()` functions. That change is available in tonight's trunc build.

    So if you want a user to see unpublished items simply pass `true` for the `$mine` parameter to these functions.
  • Thanks! I will try it out with 1.4.2 RC!
  • Tried 12-29-trunc.

    In theme zpArdoise, in print_album_thumb.php, I changed

    <?php $x = 1; while (next_album()): $lastcol = '';

    to

    <?php $x = 1; while (next_album(false, NULL, NULL, true)): $lastcol = '';

    Then I let a user log in.

    The user has following rights:
    * view fullimage, view albums
    * view gallery, view search, post comments, comments
    * managed albums
    ** 2011 (the album is checked, but the "edit" is unchecked)

    In the 2011 album page, user still cannot see the unpublished sub-albums.

    If in the user rights, I check "edit". The the unpublished sub-albums will show up.

    Does not seem to work for me, :(

    I don't know PHP though. So I may have made some silly mistakes in above change.
  • The most likely issue is that the list of albums and/or images is "cached" on the first time the script tries to obtain them. Thus, a numImages() function call will cache the list of images.

    This of course will depend on what the theme does. Probably the best action is to add a statement at the beginning of the script to "populate" the cache.

    `$album->getImages(....)` will populate the image cache
    `$obj->getAlbums(....)` will populate the subalbums.
Sign In or Register to comment.