forum.coppermine-gallery.net

Dev Board => cpg1.4 Testing/Bugs => cpg1.4 Testing/Bugs: FIXED/CLOSED => Topic started by: Casper on March 24, 2005, 09:49:10 pm

Title: issue when user edits own file
Post by: Casper on March 24, 2005, 09:49:10 pm
(note from Thu: The following posts were split from another discussion on adding files to a public album)

Tranz,

the seems to be a problem.  I uploaded the 1.4. site, which seemed to go ok.  It told me it would show when approved.
After I uploaded the 1.3.2 site, I noticed the 1.4 site was showing, so I went to check it, and found the hyperlink was not working.

I went to edit the file info, found the problem and fixed it, but when I applied the changes the file disappeared, and I received an 'you are not allowed to access this page' error.  On going back to the album, the file appears to have been deleted.

Shall I re-submit?
Title: Re: gallery showcase
Post by: Casper on March 24, 2005, 09:56:02 pm
Hmmmm, a definate problem here.

I tried to edit the file info on my other submission, in the 1.3. showcase, and the same thing has happened.  So when a user edits the file info, the file appears to be delelted.
Title: Re: gallery showcase
Post by: Tranz on March 24, 2005, 10:38:16 pm
That is strange. I saw both your entries earlier. I had approved the first one. The second one didn't need approval since I assigned you to the VIP group which did not require approval.

I have this config " Allow users to retain control over their pics in public galleries" set to Yes. I don't know what could have happened. :(
Title: Re: gallery showcase
Post by: Tranz on March 24, 2005, 11:12:18 pm
Casper, I just looked at your recent uploads page and it showed your 2 submissions. When I tried to view them, I got this:
Quote
Critical error
File is in a non existant album (0)!?

So it looks like they weren't deleted, but assigned to an album that can't be seen.

They also show up in the last uploads album, and top viewed
Title: Re: gallery showcase
Post by: Nibbler on March 24, 2005, 11:26:55 pm
Check $public_albums_list code in editonepic, it might not be filling the album box with public albums for non-admins.
Title: Re: issue when user edits own file
Post by: Tranz on March 24, 2005, 11:41:36 pm
I was able to reproduce this on my local installation. After submitting an edit as nonadmin, I got this:
Quote
You don't have permission to access this page.

File: C:\wamp\websites\cpg-dev\editOnePic.php - Line: 212

This is what I have at line 212:
Code: [Select]
if (!(GALLERY_ADMIN_MODE || $CURRENT_PIC['category'] == FIRST_USER_CAT + USER_ID || ($CONFIG['users_can_edit_pics'] && $CURRENT_PIC['owner_id'] == USER_ID))) cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__);
Observed the same behavior as Casper's files.
Title: Re: issue when user edits own file
Post by: Nibbler on March 24, 2005, 11:46:42 pm
committed fix for files going to no album, cannot replicate permissions issue.
Title: Re: issue when user edits own file
Post by: Tranz on March 24, 2005, 11:57:42 pm
Thank you, Nibbler. That fixed it so that nonadmin can edit own files.

Do the ones that have already been affected need to be manually changed in the database?

I can't see the files before the fix in editpics.
Title: Re: issue when user edits own file
Post by: Nibbler on March 24, 2005, 11:59:39 pm
You'd need to manually give them them the desired aid.
Title: Re: issue when user edits own file
Post by: Tranz on March 25, 2005, 12:05:21 am
I went into my local database and entered the album id. The problem file now shows up fine.

@casper, donnoman will have to update the gallery with the fix, and edit the database. So yay, you didn't need to resubmit. :)