Piwigo.org

You are not logged in. (Register / Login)

Announcement

Post a reply

Write your message and submit

Click in the dark area of the image to send your post.

Go back

Topic review (newest first)

icy
2012-12-05 01:36:28

Hello again,

I've created a feature branch named "hard_sub"

   https://github.com/icy/icy_picture_modify/tree/hard_sub

If you know git, simply clone the repository and switch to the branch. Or you simply download the archive
    https://github.com/icy/icy_picture_modi … sub.tar.gz
   (or https://github.com/icy/icy_picture_modi … rd_sub.zip )
and extract this to plugin directory.

Within new code, you have new directive "hard". For example, if you want Sara to access album 10 and all its sub-albums, event if some of them are forbidden by Permission settings from Piwigo, you can use

Code:

Sara:
  present_image_to: 10, sub, hard
  upload_image_to: 10, sub

(Please note the difference).

I don't know if this directive really helps. So the feature may not be merged into the master branch this moment.

Let me know if this helps.

icy
2012-12-04 17:11:35

Hi again,

After a quick test, I can see that: Your gallery "Community" (For both Sara and Fred) is *private*, and when its new sub-album is created, the one doesn't inherit full permission from the parent:

* Community: accessible by Fred, Sara (Piwigo settings)
* Fred creates new sub-album Community/Fred-Community (Piwigo settings)
* New album "Community/Fred-community" is accessible by Fred, but not by Sara. This new gallery won't have the same permssion as its parent "Community". This is a Piwigo feature ! (Piwigo settings)
* My plugin repsects this settings, hence Sara won't see "Community/Fred-Community"

As I can understand the cause of the confusion is the flag "Apply to sub-album" appeared when you change permission for some albums. When you check that box Apply to sub-album Piwigo will apply your settings to all sub-albums, and that's all, it won't apply your settings to FUTURE sub-album. My plugin respects this feature, and it won't try to "show hidden gallery" to any user.

As my plugin gets most important permission settings from Piwigo system, I haven't seen any work-around for this problem yet. Let me think twice.

(It's much easier if an album has an attribute to save the creator, like images.)

icy
2012-12-04 16:35:18

Hello smitt,

I was thinking of another issue :P I've got your idea. Thank you for the great video :)

I will try go replicate your issue at my local machine to see if there is any error. Please stay tuned!

smitt
2012-12-02 08:47:00

Hi again,
I suspected my description of events would be a bit confusing. :) Ultimately what I wish to have:
1. each user with her own album that she can control [I have done this]
2. a shared "Community" album where any user can create event sub-albums [I have done this],
3. within the event sub-albums any user can immediately add images from her user album, even if she did not create the sub-album [I cannot do this]

For example: My sister has a user album where she uploads all her photos. She created her own sub-albums and organized things however she wishes. I have the same type of user album. We both went to grandma's house for Christmas. We each took photographs and then uploaded the image files to our own respective user albums for organization. My sister then created a "Christmas at Grandma's" sub-album within "Community" for us to both collaborate by adding the best images from the trip.

This is something that I imagine many families would like. My trials have failed to get the "community" album to fully work.

icy wrote:

The plugin "community" is required, but all its settings are overridden in the file "icy_acl.zml". So you don't need to set up permissions in "Community" plugin.

My guess is sub does not apply to future sub-albums, only to those that currently exist?

Yes it does.

My experiments are counter to the results you proposed. What better way to explain than creating a 12 minute video! Maybe it will better illustrate what I have done and become obvious to you where I have failed. ;-)
Thank you.

icy
2012-12-01 15:11:15

smitt wrote:

Hi icy,
It was mentioned before that the icy_acl.zml will override all Community plugin settings, I think?

Yes it's. The plugin "community" is required, but all its settings are overridden in the file "icy_acl.zml". So you don't need to set up permissions in "Community" plugin. My plugin has no web console so all stuff must be done manually by editting configuration file.

My wish is for user "Sara" and user "Fred" to have the ability to Link images from each personal album to  any new sub-albums created within a shared community album that they both have current permissions. I wonder if there is an ACL solution?

Example
Where: 10 = Community album   ,   20 = Sara's personal album   ,   30 = Fred's personal album
Occurs: 
create_gallery_to: 10, sub   allows Sara & Fred to each create a sub-album in Community
associate_image_to: 10, 20, sub   allows Sara to see images Fred added to Community, and Link images to main Community album and to Community sub-albums that she created. Unfortunately, she cannot see or Link to Community sub-album that Fred newly created (and vice versa for Fred).

I don't really get you here. As far as I understand you want Sara (and Fred) can only work on their own gallery. Here it goes: in Piwigo, "gallery" is very dynamic and it has no attribute "OWNER", hence in Piwigo you can't say "this is Sara's gallery". You can't simply say that because the current version of Piwigo (as I know) doesn't support that. (However, you can say "this is Sara's image" -- this is because each image has an attribute to save its' uploader information.

When I visit Admin>Albums/Manage/Community/Manage sub-albums/Permissions , Fred's new Community sub-album  has permissions for Users Fred and Webmaster, but not for Group containing Sara.

As I said, the settings of Community are overridden. However, you won't see my plugin's settings in that page (Admin>Albums/Manage/Community/Manage sub-albums/Permissions). I would fix this in the future versions.

My guess is sub does not apply to future sub-albums, only to those that currently exist?

Yes it does. If you specify, "10,20,45,sub" then all (future and current) sub-albums of "10", "20", "45", in any level, are mentioned. So if you have "10 is parent of 45", "45 is parent of 98", all these albums 10, 45, 98 are mentioned.

I add some comments for your settings. (Yes you can freely add comments to "icy_acl.zml")

Code:

# This is default settings for all normal users 
# (except guest account).  Later on if some setting
# is missing for some user (for example,"fred") 
# the default value will be used.) 
# 
default:
  edit_image_of: owner
  delete_image_of: owner
  upload_image_to:
  replace_image_of: owner
  moderate_image: no
  create_gallery_to: 10, sub
  associate_image_to: 10, sub
  present_image_to:

# What's Fred username in Piwigo? The case does matter. 
# It's ok if their username is "fred"
# Fred can edit/edit image of their own. He can upload
# image to 30 and ALL its sub albums. He can make thumbnails
# and linking images for all albums 10, 30 and all their sub albums
# (in any level), even if the albums are created by other users.
#
fred:
  upload_image_to: 30, sub
  associate_image_to: 10, 30, sub
  present_image_to: 10, 30, sub
  create_gallery_to: 10, 30, sub

# (This is very similar to Fred's settings) 
sara:
  upload_image_to: 20, sub
  associate_image_to: 10, 20, sub
  present_image_to: 10, 20, sub
  create_gallery_to: 10, 20, sub

Permissions are almost perfect for me. Am I forgetting a setting?

yes, except the permission for albums :D

Thank you for creating a very useful plugin!

You're welcome. ^^ And thank you for your patience.

smitt
2012-12-01 11:09:15

Hi icy,
It was mentioned before that the icy_acl.zml will override all Community plugin settings, I think?
My wish is for user "Sara" and user "Fred" to have the ability to Link images from each personal album to  any new sub-albums created within a shared community album that they both have current permissions. I wonder if there is an ACL solution?

Example
Where: 10 = Community album   ,   20 = Sara's personal album   ,   30 = Fred's personal album
Occurs: 
create_gallery_to: 10, sub   allows Sara & Fred to each create a sub-album in Community
associate_image_to: 10, 20, sub   allows Sara to see images Fred added to Community, and Link images to main Community album and to Community sub-albums that she created. Unfortunately, she cannot see or Link to Community sub-album that Fred newly created (and vice versa for Fred).

When I visit Admin>Albums/Manage/Community/Manage sub-albums/Permissions , Fred's new Community sub-album  has permissions for Users Fred and Webmaster, but not for Group containing Sara.
My guess is sub does not apply to future sub-albums, only to those that currently exist?

Code:

default:
  edit_image_of: owner
  delete_image_of: owner
  upload_image_to:
  replace_image_of: owner
  moderate_image: no
  create_gallery_to: 10, sub
  associate_image_to: 10, sub
  present_image_to:

fred:
  upload_image_to: 30, sub
  associate_image_to: 10, 30, sub
  present_image_to: 10, 30, sub
  create_gallery_to: 10, 30, sub

sara:
  upload_image_to: 20, sub
  associate_image_to: 10, 20, sub
  present_image_to: 10, 20, sub
  create_gallery_to: 10, 20, sub

Permissions are almost perfect for me. Am I forgetting a setting?
Thank you for creating a very useful plugin!

icy
2012-09-23 10:41:32

New version v2.2.0 with "photo_update": User can (or can't) update new version of image.

Variable in icy_acl replace_image_of.  For example and syntax please read https://github.com/icy/icy_picture_modi … oc/zaml.md .

The default value of replace_image_of is owner

icy
2012-09-11 11:08:20

IGraham wrote:

I've altered the ZAML file as you suggested and it still works ok

The page the user is presented with is much nicer, clean and without the unwanted clutter, thanks for that

You're welcome ;)

There are some notes. Feel free to read https://github.com/icy/icy_picture_modi … oc/zaml.md (Section Important Notes.) I should have put them in the RELEASE NOTES.

IGraham
2012-09-11 10:58:21

Hello ICY

I've altered the ZAML file as you suggested and it still works ok

The page the user is presented with is much nicer, clean and without the unwanted clutter, thanks for that

icy
2012-09-09 15:14:34

FYI,

Group support has been added in the latest version v2.1.0.

See details in doc/ https://github.com/icy/icy_picture_modi … master/doc

icy
2012-09-09 15:02:22

@IGraham: You need to respect the format for ZAML file

Code:

# There is no space before 'default'
# There are exactly 2 spaces before 'edit_image_of'
default:
  edit_image_of: owner
  # comments

# There should be no space before 'icy'
icy:
 edit_image_of: any
 # comments

The assignment need exactly 2-spaces indentation, and user/group specifcation must be put a the column. In your code, the line "icy:" is ignored as it hasn't mean. See also in "Variable assignment" in the documentation https://github.com/icy/icy_picture_modi … oc/zaml.md . The example is provided here https://github.com/icy/icy_picture_modi … zml.sample

IGraham
2012-08-15 17:37:43

Hi

I've now got uploads and a user being able to revisit and change their own content working using community and icy_picture_modify v2.0.2 (the new version), all is working as it should (I think)

In the icy_acl.zml file I included this (below), without the 'icy' bit it doesn't work ???? Why I don't know as I don't have a user or group called icy


----

default:
  edit_image_of: owner
  delete_image_of: owner
  upload_image_to: Sub
  moderate_image: no
  create_gallery_to: sub
  associate_image_to:
  present_image_to:


  icy:
  upload_image_to: any
  edit_image_of: owner
  associate_image_to:
  present_image_to:
  delete_image_of: owner
  moderate_image: no
  create_gallery_to:

Joergen
2012-08-14 22:59:04

Issue closed for me.  ;-)

I fixed my problem. I deinstalled the latest icy version 2.x and manually installed the ver. 1.1.2.
The community plugin is doing the user rights and icy allows to modify data and delete pictures.

So, I am happy now.  :-)

Next time I am more carefully with updates. ;-)

Thank you anyway for your help.

Joergen

Joergen
2012-08-11 11:45:45

icy wrote:

Joergen wrote:

Hi icy,

I am trying to understand the config file. I want all my users to upload pictures to the folder I assign to them.
They should have the possibility to add sub folders in this and delete pictures.
They should not edit other folders or pictures.

default:
  edit_image_of: owner
  delete_image_of: no
  upload_image_to: sub
  moderate_image: no
  create_gallery_to: sub
  associate_image_to:
  present_image_to:

Is this possible with this config? (of course in a icy_acl.zml file)

This isn't work. Could you describe your problem here (or via email: my email is kyanh at viettug dot org). I'd like to know

* What's folder you want your users to upload files to?
* What do you mean "assign to them"? I don't see that assignment in the above configuration

If possible, could you please give me an example with some sample users, category id and images. If such information is so private, you may send it to my email instead.

Regards,

Ok, I will try. We have a Group of people from an adult education and they want to show there pictures made during the courses. They register to the web side and I (as Admin) give them the rights via the Community plugin to upload pictures to their own folder.
The folder was created by me and assigned only to one user (have a look http://www.fc-vhs-kaarst.de/ )
In this so called "Main Folder" with their name the user can create their own sup-folders.

This works fine so far, upload and folder creation no problem.

But the user cannot edit the picture anymore if it is uploaded, no change of metadata, tags or even if it was uploaded by mistake their cannot delete the picture.

So I thought I can use your plugin with the right configuration to do the above. The question is what would be the right config and can it do this?

My understanding is that the latest icy version now ignores the community plugin setting, right?

I am a bit confused, because I had the community and icy plugin installed and it worked fine as described above. (see screenshot from last year, you can see the delete icon)

Was this an older Version? What has changed?

Thanks for your help

Regards
Joergen

icy
2012-08-11 11:30:33

IGraham wrote:

Hi ICY
As I quite like your plugin (I know some of my users were using the functionality it gives) do you think that you could update it to work as was with the Community plugin. No rush of course (glances at watch) when ever you're the time and inclination   :))

Thank you:)

My plugin can work with community, as long as you don't use settings from "community" and you configure all permissions by using the new format icy_acl.zaml. The current version of "community" can't allow a users to upload to multiple categories, that's why I have to write this format for my plugin.

I don't have much time to work on the management console and/or to overwite the webUI of "community". I will take a look but I can't promise "when".

I provide an example of my real working configuration that I used for my site http://vonhudieu.net/ . Hope this helps.

Code:

# Default settings is to allow users to edit their own images
default:
  edit_image_of: owner
  delete_image_of:
  upload_image_to: sub
  moderate_image: no
  create_gallery_to: sub
  associate_image_to:
  present_image_to:

# Icy is a power user, he can upload images to any categories,
# can edit any images uploaded by ruby and khoalong. But he
# can only make presententation and associate images for/to
# the category 10 and its subs categories. This user can only be
# able to delete images of his own and of the account 'ruby'
icy:
  upload_image_to: any
  edit_image_of: any, khoalong, ruby
  associate_image_to: 10, sub
  present_image_to: 10, sub
  delete_image_of: owner, ruby
  moderate_image: no
  create_gallery_to: 10, sub

# Ruby is similar to 'icy'. I use the account 'icy' at home with strong
# password protected by PC. The account 'ruby' has a weaker password
# and I can use that account from my office. To reduce the risk,
# this account is not allowed to delete any images
ruby: @icy
  delete_image_of:

# 'khoalong' is a another active user on the system.
# He can do anything with his categories 32 32 34 and 35.
# He can edit and delete his own images.
khoalong:
  delete_image_of: owner
  moderate_image: no
  upload_image_to: sub, 31, 32, 34, 45
  present_image_to: sub, 31, 32, 34, 45
  create_gallery_to: sub, 31, 32, 34, 45

Board footer

Powered by FluxBB

twitter facebook google+ newsletter Donate Piwigo.org © 2002-2014 · Contact