coppermine-gallery.com/forum

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Permissions & Access Rights => Topic started by: MonkeyManx on February 03, 2005, 12:22:27 AM

Title: xp_publishin wiz problem
Post by: MonkeyManx on February 03, 2005, 12:22:27 AM
Hello, I am having a problem with the xp web publishing wizard. Being the admin I am able to upload to any category. But when I try with my test registered user account with the publizing wizard i can only add to the user album. When I upload via the gallery I have the option of uploading to any of the public albums. Is this a bug? can it be fixed? Am I doing something wrong? Please help!
Title: Re: xp_publishin wiz problem
Post by: Tranz on February 03, 2005, 02:20:48 AM
Please do not cross-post. I have removed the duplicate.
Title: Re: xp_publishin wiz problem
Post by: Joachim Müller on February 03, 2005, 09:10:06 AM
for a start I suggest you post your url and a test user account (non-admin), so others can check.

Joachim
Title: Re: xp_publishin wiz problem
Post by: Casper on February 03, 2005, 10:22:47 AM
This is not a bug, it is actually a feature from the early versions, designed to stop flooding to the main categories.  In fact the code allows upload to any album only by the actual owner of that album, so in the case of the main cats, that is the admin.
And as users cannot create albums in other categories, that is the only place they can upload to using this facility.

I looked into this before, and found all previous versions have this, and it is(or used to be) annotated in the source code.

And I don't know how to change it.

Title: Re: xp_publishin wiz problem
Post by: MonkeyManx on February 03, 2005, 09:29:32 PM
I just realized that. looking at the xp_piblish.php file it says pretty much what you just. I suppose I will dig into the code and try and change it myself.
Title: Re: xp_publishin wiz problem
Post by: Gas on February 17, 2005, 05:06:40 PM
Hi!

I'm am new to coppermine and i'm planning to install it on my website.

I want to have public galleries where registered users can upload pictures by Publishing wizard. I know that you can't give users rights to create albums, so i want to give users rights to add pictures to galleries.

the problem is the same MonkeyManx's: Uploading to existing albums is not possible with xp publishing wizard.

Did anyone find a solution for this?
Title: Re: xp_publishin wiz problem
Post by: Joachim Müller on February 17, 2005, 05:57:53 PM
when reporting upload issues it'd be a good idea to post a link and test user account (non-admin), so others can look into your issue - we are not clairvoyants.

Joachim
Title: Re: xp_publishin wiz problem
Post by: Gas on February 17, 2005, 11:20:04 PM
Sorry, i recently deleted my coppermine, because i want to reinstall it.

But as i said, the problem is the same as MonkeyManx.

I just want to disable the security feature when uploading with wep publishing wizard.
If you need my album, i can reinstall it tomorrow.
Title: Re: xp_publishin wiz problem
Post by: Joachim Müller on February 18, 2005, 06:26:30 AM
not sure what you mean. Set the album properties accordingly, XP_Publish should respect them. Come back here if you actually have an install, theoretical questions without an actual app to check against are hard to track or fix ::).

Joachim
Title: Re: xp_publishin wiz problem
Post by: Gas on February 21, 2005, 06:06:47 PM
i reinstalled the gallery and sent you a pm containing all the neccesary information...

Thanks for helping me!
Title: Re: xp_publishin wiz problem
Post by: Casper on February 21, 2005, 08:02:40 PM
GauGau, nor any member of the dev team, reply to PMs sent that were not asked for.

The simple fact is that using xp_publish, normal users cannot upload to the main categories.  Changing the code would be a considerable job, and has not been done yet, and is not on any priority, so is unlikely to happen soon.


Title: Re: xp_publishin wiz problem
Post by: Joachim Müller on February 22, 2005, 12:46:10 PM
...additionally, I don't even have Windows XP, so even if I wanted to I couldn't help you with this issue - hopefully you can see the point how futile PMs to supporters are. ::)

Joachim
Title: Re: xp_publishin wiz problem
Post by: Gas on February 22, 2005, 03:40:57 PM
ok, ok... sorry for sending you a pm. I'll not do it again.

So, uploading to existing albums with given permissions is not possible with XP publisher, unless you are an admin. And noone knows how to enable it. Am i correct?

At least the programmer of the XP_Publisher integration should know it... or is there another way to solve this?
Title: Re: xp_publishin wiz problem
Post by: Gas on February 24, 2005, 09:51:01 AM
I read through the forums for over an hour and in every post i read about the publisher, there is written that it's possible that registered user can post into albums using Publisher, as long as the album has the "Users can upload files" - flag. I don't see any reason why this should not work.
If anyone can help me, please do it.

Url: www.der-gas.de/coppermine
Test-Account: testuser
Password: test

The user belongs to the "registered group", which may upload without approval.

Thanks in advance
Title: Re: xp_publishin wiz problem
Post by: Nibbler on February 24, 2005, 07:55:26 PM
It doesn't even look for public albums with upload perms set as far as I can see. If you are a registered user, you can upload into your user gallery and that is all.
Title: Re: xp_publishin wiz problem
Post by: MonkeyManx on February 24, 2005, 08:57:36 PM
Correct, as far as I can tell the problem is in: xp_publish.php
Title: Re: xp_publishin wiz problem
Post by: Gas on February 24, 2005, 11:34:36 PM
did you already find a solution for this? I mean its stupid why people should not be allowed to upload to albums they have the permission for with XP-publisher.

Title: Re: xp_publishin wiz problem
Post by: MonkeyManx on February 25, 2005, 12:48:59 AM
No I did not find a solution, but I think there might be a "quick and dirty" solution by manipulating this code:
// Return the HTML code for the album list select box
function html_album_list(&$alb_count)
{
    global $CONFIG;

    if (USER_IS_ADMIN) {
        $public_albums = mysql_query("SELECT aid, title FROM {$CONFIG['TABLE_ALBUMS']} WHERE category < " . FIRST_USER_CAT . " ORDER BY title");
        if (mysql_num_rows($public_albums)) {
            $public_albums_list = db_fetch_rowset($public_albums);
        } else {
            $public_albums_list = array();
        }
    } else {
        $public_albums_list = array();
    }

    if (USER_ID) {
        $public_albums = mysql_query("SELECT aid, title FROM {$CONFIG['TABLE_ALBUMS']} WHERE category < " . FIRST_USER_CAT . " ORDER BY title");
        if (mysql_num_rows($public_albums)) {
            $public_albums_list = db_fetch_rowset($public_albums);
        } else {
            $public_albums_list = array();
        }
    } else {
        $public_albums_list = array();
    }

    $alb_count = count($public_albums_list) + count($user_albums_list);

    $html = "\n";
    foreach($public_albums_list as $album) {
        $html .= '                        <option value="' . $album['aid'] . '">* ' . $album['title'] . "</option>\n";
    }
    foreach($public_albums_list as $album) {
        $html .= '                        <option value="' . $album['aid'] . '">' . $album['title'] . "</option>\n";
    }

    return $html;
}

Lines 205 - 243.
Just dont know what to do. I tried making the user have the same code as admn, but just ran into a head of errors.