Announcement

#16 2013-03-23 01:16:17

icy
Translation Team
Vietnam
2011-06-30
105

Re: I am realy hopeless with (community/ICY_Modify_Pic Plugin)

Joergen wrote:

There is also a negative side effect, I can upload pictures into some other folders and it is not easy traceable how did this!

I think that's due to to you have settings default: that's for all users. Pls. check the previous post.

Offline

 

#17 2013-03-23 11:33:23

Joergen
Translation Team
Germany
2011-09-30
114

Re: I am realy hopeless with (community/ICY_Modify_Pic Plugin)

icy wrote:

> So, next question, how can I make that each user can only upload pics to his folder and only create folder inside his folder?  :-)

The setting default: is for all users. If you need setting for the user Jack you can do as the following

Code:

Jack:
  edit_image_of: owner
  delete_image_of: owner
  upload_image_to: 134
  moderate_image: no
  create_gallery_to: sub, 134
  associate_image_to:
  present_image_to:
  replace_image_of: owner

Ok I will try this, it will be not easy with 40 Users and needs to be done for every new registration.
I wonder how you can find out the category number from a new registered user?
If there is no picture uploaded there is also no folder and no number!

Anyway thank for your help already.

One additional comment to the Piwigo developer, I wonder why user management is so complicated in Piwigo?
And why you need two extra Plugins to provide basic user management?
In my humbled opinion, user rights and edit/delete functions should be in the  basic settings of Piwigo.
May be I misunderstand the concept, please forgive me.
I am still happy to use Piwigo (for free) and I will continue my contribution by helping in translations.

Offline

 

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

#18 2013-03-23 14:34:35

icy
Translation Team
Vietnam
2011-06-30
105

Re: I am realy hopeless with (community/ICY_Modify_Pic Plugin)

Joergen wrote:

Ok I will try this, it will be not easy with 40 Users and needs to be done for every new registration.

You have some options
* Using groups in Piwigo
* Using reference in the file icy_acl.zml

See the example for example_user3 in [Github] icy_picture_modify file doc/icy_acl.zml.sample

I wonder how you can find out the category number from a new registered user?

I think you are missing something. Category number has nothing to do with registered user. If you meant "user number" then you don't need because in the syntax of "icy_acl.zml" you just need to provide the user nick name.

If there is no picture uploaded there is also no folder and no number!

No you can't. The gallery must exist before you grant permission on them. This is naturally. I think you meant when new user registers their account they can upload to their *own* gallery you need to provide some common album for them.

One additional comment to the Piwigo developer, I wonder why user management is so complicated in Piwigo?

Piwigo is primarily for single-user purpose. If you need complex but simple ACL settings you may take a look at ZenPhoto. I switched from Zen to Piwigo, though ;)

Btw, I am not a Piwigo developer in the strict mean. I just wrote my plugin for my personal purpose and I share it because it may be helpful somewhere.


And why you need two extra Plugins to provide basic user management?

What do you mean "two extra plugins"?

In my humbled opinion, user rights and edit/delete functions should be in the  basic settings of Piwigo.
May be I misunderstand the concept, please forgive me.

I explain in the previous part. Piwigo is for single-user purpose. However some plugins can make it a multiple-users platform. My plugin is just one; you have problem because it doesn't have a friendly WebUI.

I am still happy to use Piwigo (for free) and I will continue my contribution by helping in translations.

Offline

 

#19 2013-03-25 08:08:37

Joergen
Translation Team
Germany
2011-09-30
114

Re: I am realy hopeless with (community/ICY_Modify_Pic Plugin)

To follow up: (and also for others)

> It seems that I do not really understand how ICY plugin works.
> May be you have a minute to explain a bit for me.
>
> Let´s say I have two groups (GR1 and GR2), in GR1 I have 10 members
> (tom1, tom2, ... tom10), in GR2 I have 5 members (peter1, peter2, ...
> peter5) Everybody has got his own gallery, rights are given (or link
> set) by Community plugin. So how should the icy_acl.zml file look
> like?
>
> tom1:
>   edit_image_of: owner
>   delete_image_of: owner
>   upload_image_to: sub 3     #what kind of key is possible here?
> Do I need a number? Can I use "sub owner"
>   moderate_image: no
>   create_gallery_to: sub 3    #what kind of key is possible here?
>   associate_image_to:
>   present_image_to:
>   replace_image_of: no
>
> tom2:
>   edit_image_of: owner
>   delete_image_of: owner
>   upload_image_to: sub 3
>   moderate_image: no
>   create_gallery_to: sub 3
>   associate_image_to:
>   present_image_to:
>   replace_image_of: no
>
> etc.
>
> Every user should upload picture in his own gallery and should edit
> and delete them.
> If I use Group GR1 instead of tom1, 2, ... is it still that they can
> upload only to their own gallery only?

Answer from ICY:

You don't need any settings in the plugin `community`. Actually those settings will be overwritten.

In Piwigo, an album hasn't owner, thats' why you can't use
   upload_image_to: owner
   # create_gallery_to: owner

(every settings ended by "_to" has the same problem)

For your gallery settings you can do as below
  * Create new gallery for each user (yes you have to do it manually or
    if you know some SQL you can do that in a geeky way.)
  * Create settings for group
  * Create settings for each user

Example (you don't need to use a Group whose name does exist in Piwigo, because you can use Reference in my plugin). The number 44 and 45 are just samples you may use other ones.

every_tom:
  edit_image_of: owner
  delete_image_of: owner
  moderate_image: no
  associate_image_to:
  present_image_to:
  replace_image_of: no
  upload_image_to:
  create_gallery_to:

tom1: @every_tom
  upload_image_to: sub 44
  create_gallery_to: sub 44

tom2: @every_tom
  upload_image_to: sub 45
  create_gallery_to: sub 45
 
# bla bla

Per-user setting is long, so many tasks, but this is feature: Piwigo doesn't support Album owner . This sounds annoyed but that helps you to create dynamic albums in Piwigo. I believe there are some reasons that Piwigo decides to do that (at the moment), but I am not sure why.

(Actually I can support "owner" for albums, but that requires a lot of work and it may be against Piwigo philosophy)

Offline

 

#20 2013-07-23 14:03:02

jens_i_r
Member
2013-07-04
5

Re: I am realy hopeless with (community/ICY_Modify_Pic Plugin)

It seems that I am having some of the same issues as Joergen, so I am attaching my post to this thread instead of starting a new one.
I seem to have the same problems understanding how the permissions work, so maybe I am misunderstanding a lot of things here.
My basic needs are the folowing:
I wanted to have one (manually created) gallery for each user and each user can only upload to or edit his/her gallery, no other user galleries.
In addition I wanted to have some common galleries, controlled by admin, where the admin can decide if ordinary users are allowed to upload to each common gallery.
From this thread I am now getting the understanding that the only way to acheive these objectives is by editing the icy_acl.zml every time
- a new user is added
- a new gallery is added
This implies that there is no way to set this up generically once and for all so that all tasks (new users and new galleries) can be done purely from the administration panel.
Can someone confirm that my understanding is correct?

Thanks
Jens

Offline

 

#21 2013-07-24 07:10:58

icy
Translation Team
Vietnam
2011-06-30
105

Re: I am realy hopeless with (community/ICY_Modify_Pic Plugin)

This implies that there is no way to set this up generically once and for all so that all tasks (new users and new galleries) can be done purely from the administration panel.

No there is no way to do that with my plugin.  For users, you can use Group (My plugin understands group from Piwigo system), but for new gallery there is no way so far.

If you know some PHP you can write a cronjob to generate configuration automatically.

I will take a look on your issue. However there is no clear plan for that in a near future.

Offline

 

#22 2013-07-25 09:51:17

jens_i_r
Member
2013-07-04
5

Re: I am realy hopeless with (community/ICY_Modify_Pic Plugin)

Thanks for confirming my assumptions

Jens

Offline

 

#23 2013-08-12 15:48:27

Kalle
Member
2012-08-17
89

Re: I am realy hopeless with (community/ICY_Modify_Pic Plugin)

Does edit_image_of work with groups or the keyword "any"?

I like to allow spezial users to help, but don't have full administrator rights.

Example:

# ### Moderatoren of galerie 2
~MOD-G2:
  upload_image_to: 2, sub
  edit_image_of: owner, ~group-xy
  create_gallery_to: 2, sub
  delete_image_of: any
  replace_image_of: any
  moderate_image: no

Offline

 

#24 2013-08-12 16:10:53

icy
Translation Team
Vietnam
2011-06-30
105

Re: I am realy hopeless with (community/ICY_Modify_Pic Plugin)

Does edit_image_of work with groups or the keyword "any"?

I like to allow spezial users to help, but don't have full administrator rights.

edit_image_of works with any and with a list (array) of authors.

I will take a look if I can write new support to get edit_image_of to work with a group of users. Stay tuned!

Offline

 

#25 2013-08-13 03:28:22

icy
Translation Team
Vietnam
2011-06-30
105

Re: I am realy hopeless with (community/ICY_Modify_Pic Plugin)

@Kalle: please upgrade to the latest version (v2.4.0) and you can use group when specify values for edit_image_of (and other _of fields. An example that allows any user belongs to the group "Authors" can edit an image of the users in the "Friends" group

Code:

Authors:
  edit_image_of: owner, Friends

Let me know if you have any problem with new feature.

Offline

 

#26 2013-08-13 15:25:03

Kalle
Member
2012-08-17
89

Re: I am realy hopeless with (community/ICY_Modify_Pic Plugin)

What do you proof as "Owner" ?  The Uploader (shown with the plugin "Photo added by" or the "Author"? Or both?

Offline

 

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

#27 2013-08-13 15:43:07

icy
Translation Team
Vietnam
2011-06-30
105

Re: I am realy hopeless with (community/ICY_Modify_Pic Plugin)

> What do you proof as "Owner" ? 

"owner" means the one who uploaded the image.

> The Uploader (shown with the plugin "Photo added by" or the "Author"? Or both?

"Authors" in my example is just a group name. I'm sorry if this makes you confused.

My engish is not good. I try my best to show my idea in this example

[Github] icy_picture_modify file doc/icy_acl.zml.sample

Hope that helps.

Offline

 

#28 2013-08-13 16:13:00

Kalle
Member
2012-08-17
89

Re: I am realy hopeless with (community/ICY_Modify_Pic Plugin)

The members of a group are get from the Piwigo administrator menu, right?

So the following example should allow the members of the modgroup (on my system all groups start with ~) to edit or delete alle pictures of the members of the group ~g01

~g01:
  edit_image_of: owner
  delete_image_of: owner

~modgroup:
  edit_image_of: owner, ~g01
  delete_image_of: owner, ~g01

############################

Something is wrong. With previous additional lines, all users can modify alle other pictures. For that, it is not needed to be member of one of these groups.

Last edited by Kalle (2013-08-13 16:50:43)

Offline

 

#29 2013-08-14 17:01:21

icy
Translation Team
Vietnam
2011-06-30
105

Re: I am realy hopeless with (community/ICY_Modify_Pic Plugin)

> The members of a group are get from the Piwigo administrator menu, right?

Yes. Both groups and members are from Piwigo administrator

> So the following example should allow the members of the modgroup (on my system all groups start with ~) to edit or delete alle pictures of the members of the group ~g01

> Something is wrong. With previous additional lines, all users can modify alle other pictures. For that, it is not needed to be member of one of these groups.

Would you mind showing the full configuration? If that's so private you may use my personal issue kyanh at theslinux dot org .

(And please let me know the Piwigo version that you are using.)

Thanks,

Offline

 

#30 2013-08-14 17:44:29

Kalle
Member
2012-08-17
89

Re: I am realy hopeless with (community/ICY_Modify_Pic Plugin)

# Default settings for all users (except guest user). These settings are
# put in the code of the plugin `icy_picture_modify` so you may not have
# to specify them. All of the following lines mean:
# - User can edit their own images (image they uploaded)
# - User can't delete any image
# - User can upload image to sub categories. Unfortunately, there is no
# category specified, so they can't upload images to any category.
# - All images are showed on the Piwigo system after they are uploaded;
# they will not require any moderation work
# - User can create new gallery inside sub categories. As there isn't
# any category specified, they can't create any new gallery.
# - User can't link an image to any album
# - User can't create representation for any album

default:
  upload_image_to:
  edit_image_of:
  delete_image_of: 
  moderate_image: yes
  create_gallery_to:
  associate_image_to:
  present_image_to:
  replace_image_of:

~TMJ-T:
  upload_image_to: 7, sub
  edit_image_of: owner
  create_gallery_to: 7, sub
  delete_image_of: owner
  replace_image_of: owner

~TMJ-N:
  upload_image_to: 6, sub
  edit_image_of: owner
  create_gallery_to: 6, sub
  delete_image_of: owner
  replace_image_of: owner

~kai-zone:
  upload_image_to: 9, sub
  edit_image_of: owner
  create_gallery_to: 9, sub
  delete_image_of: owner
  replace_image_of: owner

~g01:
  edit_image_of: owner
  delete_image_of: owner

~modgroup:
  edit_image_of: owner, ~g01
  delete_image_of: owner, ~g01
 
# ENDE

Piwigo version is 2.5.2, running on php 5.4.9

Offline

 

Board footer

Powered by FluxBB

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