coppermine-gallery.com/forum

Support => Older/other versions => cpg1.2 Standalone Support => Topic started by: shoe on October 16, 2003, 02:31:47 AM

Title: group permission for albums doesn't work
Post by: shoe on October 16, 2003, 02:31:47 AM
i get the following error message when i set a specific group permission to an album with a user not restricted with this specified group, if it's the only album in this category:

Warning: Invalid argument supplied for foreach() in /home/www/mydomain/testgallery/themes/rainy_day/theme.php on line 1199

   foreach($alb_list as $album) {
        $count ++;

        $params = array('{COL_WIDTH}' => $column_width,
            '{ALBUM_TITLE}' => $album['album_title'],
            '{THUMB_CELL_WIDTH}' => $thumb_cell_width,
            '{ALB_LINK_TGT}' => "thumbnails.php?album={$album['aid']}",
            '{ALB_LINK_PIC}' => $album['thumb_pic'],
            '{ADMIN_MENU}' => $album['album_adm_menu'],
            '{ALB_DESC}' => $album['album_desc'],
            '{ALB_INFOS}' => $album['album_info'],
            );

        echo template_eval($album_cell, $params);

        if ($count % $columns == 0 && $count < count($alb_list)) {
            echo $rows_separator;
        }
    }


and i even can't delete the album, change properties or edit pics when i'm logged in as a member of this group
Title: group permission for albums doesn't work
Post by: Joachim Müller on October 16, 2003, 08:54:08 AM
got a link where we can take a look?

GauGau
Title: group permission for albums doesn't work
Post by: shoe on October 16, 2003, 11:13:07 AM
check this link:
http://www.talebox.com/coppertest/index.php?cat=2

@gaugau: i send you a pm with login and pass for admin and user with specified group.
Title: group permission for albums doesn't work
Post by: Joachim Müller on October 16, 2003, 11:23:59 AM
the error message goes away if you choose another theme, so my first guess is you over-modified the theme.
I then chose default theme, created an album, created a cat, created another album in the new cat I didn't have the properties button, so I guess you over-modified that too.
Try with a fresh install (or at least with the origina files that come with the downloaded package), no modifications at all! Get your permissions running, then start modifying files.

GauGau
Title: group permission for albums doesn't work
Post by: shoe on October 16, 2003, 11:39:34 AM
the error message just goes away if you choose the default theme, on all other themes the message appears. i didn't modify any of the themes. this is a fresh installation of coppermine 1.2 rc2 with no modifications at all.
Title: group permission for albums doesn't work
Post by: Neofred on October 16, 2003, 04:34:45 PM
Hi gaugau,

I got the same error message.  :(

greetz

Neofred
Title: group permission for albums doesn't work
Post by: Jess on October 17, 2003, 04:00:18 AM
My problem is similar if not the same.

When I hide an album so only a specific group can see it,
even as an admin, or a member of the group or both,

it shows up but only as a single thumbnail, there is no text
there is no title and the link ends as album=
with no number so when clicked, its reported as non existant

if you aren't a member, you just cant see it at all.
Title: group permission for albums doesn't work
Post by: Neofred on October 17, 2003, 09:42:23 AM
My problem is a little bit different from the others, because I've updated an existing 1.1 installation from CPG standalone. The group function works very well on this version. And the update was right smooth 8) . The only error is this in the album view:
Warning: Invalid argument supplied for foreach() in /usr/.../x2o.de/bdb/themes/water_drop/theme.php on line 1177
Hope anybody find a solution for us   :(

Greetz

Neofred
Title: group permission for albums doesn't work
Post by: Joachim Müller on October 17, 2003, 10:44:00 AM
I just started a bug tracker on this issue - we'll keep you informed...

GauGau
Title: group permission for albums doesn't work
Post by: windwind on October 21, 2003, 08:46:52 AM
i've encountered the same problem too when i enable the "View by members only" function.

Warning: Invalid argument supplied for foreach() in
/public_html/gallery/themes/hardwired/theme.php on line 1189


Thanks for helping!
Title: view by members only
Post by: cadsup on October 21, 2003, 09:00:33 PM
view by members only...

where is this funtion please?
Title: Found it...
Post by: cadsup on October 22, 2003, 01:01:27 AM
Ok I found 'Group Permissions' in 'Properties' of the album

I set it to 'Registered only' but didn't realise it excluded admin from looking at them...

now I can't find how to set it back?! can't see any thumbs, just  the album name.

Help me - I'm drowning! (please)

OK Sorted,

You can't view Albums as Administrator if they are set to Registered Users Only :D

Glad I learnt to swim in time
Title: Re: view by members only
Post by: windwind on October 22, 2003, 03:35:05 AM
Quote from: "cadsup"view by members only...

where is this funtion please?

In the album properties,  "Album can be viewed by Members of the 'Members ' group" in Permissions for this album.

i also failed to delete the album somehow the album was crashed or sometthing after the i set this permission.

Thanks for help!
Title: group permission for albums doesn't work
Post by: Joachim Müller on October 22, 2003, 09:10:58 AM
admin can still see albums that "belong" to other groups as long as he's in admin mode; in user mode (a simulation what a "regular" user can see) he can't - this is by design and is meant to be this way.

GauGau
Title: I can't
Post by: cadsup on October 22, 2003, 09:28:48 AM
I tried setting 1 album 'Registered Users' & 1 'admin only'
In admin mode I can only see thumbs of 'admin only' in home page
logged in as a reg user I can only see thumbs of 'Reg Users' album
Still see album titles, still able to see last uploaded & random for both
Title: group permission for albums doesn't work
Post by: Joachim Müller on October 22, 2003, 09:34:07 AM
what's your config setting for "Show private album Icon to unlogged user"? If it's "no", then you even can't see the album that belongs to a special group when logged in as admin...

GauGau
Title: Invalid argument supplied for foreach
Post by: tlicking on October 25, 2003, 06:14:44 PM
I get the same error when setting "Albums can be view by"  = "Members of the 'Registered' group"   The only way to recover is to delete the album, re-create and allow "Everybody" (public album)

Has anyone found a solution?

Thanks,
Todd
Title: group permission for albums doesn't work
Post by: cadsup on October 26, 2003, 04:32:35 PM
Thanks very much GauGau

That was indeed the thing I was missing :D

btw any news on 1.2 porting for nuke?

thx again
Title: group permission for albums doesn't work
Post by: Joachim Müller on October 26, 2003, 07:41:20 PM
I'm not involved in the PHPnuke port, check the appropriate board. If you're very interessted and know what you're doing you can get the latest dev code using the web-cvs (which lags a little behind the "real" cvs): http://cvs.sourceforge.net/viewcvs.py/coppermine/phpnuke/

GauGau
Title: group permission for albums doesn't work
Post by: Brendan on October 26, 2003, 08:16:20 PM
You don't have to delete the album to get it back.  Edit another album and select the album with the problem in the pull down.  You can change the permissions back to Everyone.

-Brendan
Title: group permission for albums doesn't work
Post by: the_Sisko on October 29, 2003, 10:49:41 PM
Just wanted to say, I have the same error here.
Looking forward for a fix.
Title: invision power board 1.2 integration problem... CPG1.2.0 RC2
Post by: duntuk on November 02, 2003, 11:29:24 PM
ok... here's the problem with the "group permissions" in coppermine... (ref to CPG 1.2.0 RC2)

cpg does NOT allow *multiple* group permissions... or recognize group permission mask inheritance (such as in IPB 1.2, where you can ad multiple group masks to a specific group...)

The problem is, if you have CPG integrated with IPB... if you select, for instance, to allow only the "members" group to view a specific album...  other groups, such as, "moderators" will NOT be able to view these albums at all....  which is a pitty...

[size=8] (even if you have multiple permission masks in IPB set to in "moderators" group to include "members")[/size]

Nevertheless...

there should definitely be an option in CPG to include multiple group viewing permissions... (similar to the layout that's currently being used for 'groups' under the admin menu...... actually, 4images does something like this already...)
Title: group permission for albums doesn't work
Post by: Joachim Müller on November 03, 2003, 07:41:11 AM
you're right, muti-group membership and permission inheritance would be nice, but don't exist within coppermine.
I just wanted to point out that a group "moderators" may have elevated rights in your bbs, but to coppermine it's just a name as every other group.
Don't expect to have mutli-group membership in the near future...

GauGau
Title: group permission for albums doesn't work
Post by: duntuk on November 03, 2003, 08:04:27 AM
thanks for the reply gaugau....

i also read the part about this requested feature to be added in the 'far' future in one of your other posts...

well... i guess we'll all be looking towards the future till then...

 :P

anyhow... we decided to keep coppermine for the portfolio and use 4images for all other photos...
Title: Admin cannot see all albums
Post by: nitschkecm on December 15, 2003, 05:03:11 PM
Hi,

I have the same problem with the Admin. I have created an Album and when I set the permisions to a certain Group only I have no access as admin to them.

Any suggestions ?

Otherwise Coppermine is just great :)

Carsten
Title: group permission for albums doesn't work
Post by: Casper on December 15, 2003, 05:55:57 PM
see these threads http://forum.coppermine-gallery.net/index.php?topic=758 and http://forum.coppermine-gallery.net/index.php?topic=579
Title: group permission for albums doesn't work
Post by: Joachim Müller on December 16, 2003, 12:58:25 AM
There's a fix available for this which has been introduced by DJMaze and has been committed to the dev branch of coppermine (which will become a future release). For the moment, search the code for this lineif ($visibility == '0' || $visibility ==
(FIRST_USER_CAT + USER_ID)) {
and replace it withif ($visibility == '0' || $visibility ==
(FIRST_USER_CAT + USER_ID) || $visibility ==
$USER_DATA['group_id']) {


GauGau
Title: group permission for albums doesn't work
Post by: unforgiven on April 14, 2004, 10:54:08 PM
Quote from: "gaugau"There's a fix available for this which has been introduced by DJMaze and has been committed to the dev branch of coppermine (which will become a future release). For the moment, search the code for this lineif ($visibility == '0' || $visibility ==
(FIRST_USER_CAT + USER_ID)) {
and replace it withif ($visibility == '0' || $visibility ==
(FIRST_USER_CAT + USER_ID) || $visibility ==
$USER_DATA['group_id']) {


GauGau

Just kicking this topic....Has anyone tried this ? I'm having the same problem. I worked around it by creating an 'admin album' in each category, which is only available for the admin. This way, I can always select every gallery, by going into properties of this admin album, and from there, select the gallery from the pulldown.

But it would be nice if I could add several groups to a gallery.
So, anyone ?

cheers,

Unforgiven
Title: group permission for albums doesn't work
Post by: Casper on April 14, 2004, 11:40:43 PM
Multiple group membership is available in version 1.3, which is very close to finishing it's beta testing.  And the visibility problems are solved.