•  » Miscellaneous
  •  » unofficial mirror; allow users to modify their images

#46 2012-08-11 11:45:45

Joergen
Translation Team
Germany
2011-09-30
114

Re: unofficial mirror; allow users to modify their images

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

Last edited by Joergen (2012-08-11 11:48:47)

Offline

 

#47 2012-08-14 22:59:04

Joergen
Translation Team
Germany
2011-09-30
114

Re: unofficial mirror; allow users to modify their images

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

Offline

 

#48 2012-08-15 17:37:43

IGraham
Member
UK
2011-09-28
193

Re: unofficial mirror; allow users to modify their images

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:

Last edited by IGraham (2012-08-15 17:40:03)

Offline

 

Notice: Undefined offset: 5 in /var/www/piwigo.org/forum/include/parser.php on line 551

#49 2012-09-09 15:02:22

icy
Translation Team
Vietnam
2011-06-30
105

Re: unofficial mirror; allow users to modify their images

@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 [Github] icy_picture_modify file doc/zaml.md">https://github.com/icy/icy_picture_modi … oc/zaml.md . The example is provided here Last edited by icy (2012-09-09 15:12:15)

Offline

 

#50 2012-09-09 15:14:34

icy
Translation Team
Vietnam
2011-06-30
105

Re: unofficial mirror; allow users to modify their images

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

Offline

 

#51 2012-09-11 10:58:21

IGraham
Member
UK
2011-09-28
193

Re: unofficial mirror; allow users to modify their images

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

Offline

 

Notice: Undefined offset: 5 in /var/www/piwigo.org/forum/include/parser.php on line 551

#52 2012-09-11 11:08:20

icy
Translation Team
Vietnam
2011-06-30
105

Re: unofficial mirror; allow users to modify their images

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 [Github] icy_picture_modify file doc/zaml.md (Section Important Notes.) I should have put them in the RELEASE NOTES.

Offline

 

Notice: Undefined offset: 5 in /var/www/piwigo.org/forum/include/parser.php on line 551

#53 2012-09-23 10:41:32

icy
Translation Team
Vietnam
2011-06-30
105

Re: unofficial mirror; allow users to modify their images

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 [Github] icy_picture_modify file doc/zaml.md .

The default value of replace_image_of is owner

Offline

 

#54 2012-12-01 11:09:15

smitt
Member
USofA
2012-12-01
6

Re: unofficial mirror; allow users to modify their images

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!

Offline

 

#55 2012-12-01 15:11:15

icy
Translation Team
Vietnam
2011-06-30
105

Re: unofficial mirror; allow users to modify their images

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.

Offline

 

#56 2012-12-02 08:47:00

smitt
Member
USofA
2012-12-01
6

Re: unofficial mirror; allow users to modify their images

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.

Offline

 

#57 2012-12-04 16:35:18

icy
Translation Team
Vietnam
2011-06-30
105

Re: unofficial mirror; allow users to modify their images

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!

Offline

 

#58 2012-12-04 17:11:35

icy
Translation Team
Vietnam
2011-06-30
105

Re: unofficial mirror; allow users to modify their images

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.)

Last edited by icy (2012-12-04 17:16:25)

Offline

 

#59 2012-12-05 01:36:28

icy
Translation Team
Vietnam
2011-06-30
105

Re: unofficial mirror; allow users to modify their images

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.

Offline

 

#60 2015-04-17 08:57:03

Balram malav
Guest

Re: unofficial mirror; allow users to modify their images

Hello icy,

Icy Picture Modify not working with Icy Picture Modify plugin.

Community upload image not working proper when i installed Icy Picture Modify plugin.

I ma using latest version of Icy Picture Modify, Icy Picture Modify and piwigo.

error :

Notice: Undefined index: storage in C:\xampp\htdocs\demo\piwigo\plugins\community\add_photos.php on line 105

Notice: Undefined index: nb_photos in C:\xampp\htdocs\demo\piwigo\plugins\community\add_photos.php on line 134


Warning:  [mysql error 1064] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')
    AND cp.moderated = 'false'' at line 6

SELECT
    cp.category_id,
    c.uppercats
  FROM piwigo_community_permissions AS cp
    LEFT JOIN piwigo_categories AS c ON category_id = c.id
  WHERE cp.id IN ()
    AND cp.moderated = 'false'
; in C:\xampp\htdocs\demo\piwigo\include\dblayer\functions_mysqli.inc.php on line 830


Fatal error: Call to a member function fetch_assoc() on a non-object in C:\xampp\htdocs\demo\piwigo\include\dblayer\functions_mysqli.inc.php on line 211

My icy_acl File configuration is

default:
  allow_guest: yes

guest:
  edit_image_of:
  delete_image_of:
  upload_image_to: 10
  moderate_image: yes
  create_gallery_to:
  associate_image_to:
  present_image_to:
  replace_image_of:

expert:
  upload_image_to:any
  edit_image_of:  any
  associate_image_to: any
  create_gallery_to: any
  present_image_to: no
  delete_image_of:owner


Please help me to fix this issue.


Thanks

 
  •  » Miscellaneous
  •  » unofficial mirror; allow users to modify their images

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact