Frontend upload: strange behaviour on access check

Phoca Gallery - image gallery extension
asvdw
Phoca Newbie
Phoca Newbie
Posts: 1
Joined: 28 Aug 2015, 10:18

Frontend upload: strange behaviour on access check

Post by asvdw »

Hello,

I've lost my last hair on setting upload access in frontend... then found a hack but it seems strange...

The problem was that authorized users didn't have access to upload/create category tab in frontend, category view.
I checked the code and see this, in category view.html.php l.470

Code: Select all

$rightDisplayUpload = PhocaGalleryAccess::getUserRight('uploaduserid', $this->category->uploaduserid, 2, $this->tmpl['user']->getAuthorisedViewLevels(), 	$this->tmpl['user']->get('id', 0), 	0);
So after looking through access.php, I understood the problem was my user didn't have the joomla access level with id 2 (which was a test I made long time before...)
So using Joomla admin I've given this access level to the group my user belongs to, and now it works...
But I can't understand why this value is hard-coded ?

Sory for my bad english, hoping you understand something ;)
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Frontend upload: strange behaviour on access check

Post by Jan »

Hi, try to check this, maybe it is related to the same problem:
viewtopic.php?f=31&t=37020

If you are using current version of Joomla! - try to go to Phoca Download Gallery administration - Tab Users and select all the groups which will have the right to upload.

Jan
If you find Phoca extensions useful, please support the project
rorshack
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 13 Sep 2015, 15:18

Re: Frontend upload: strange behaviour on access check

Post by rorshack »

Hi,
could you explain that better. I think I have the same problem. I can't allow users to upload images from the front end. The User Control Panel doesn't allow users to upload images even though the folder exists and the main category exists.
I've read the documentation but it made more confused because it talks about parameters that doesn't exist in real life! :x

Please help me!
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Frontend upload: strange behaviour on access check

Post by Jan »

Hi, see the description of the parameter and just follow this:
"Go to Phoca Download Options - Tab General - Parameter Access Level - Registered Users and select groups which will be taken as registered."

EDIT:

sorry for the confusing, but it is the same parameter like in Phoca Gallery, so see next post of Benno to find it in Phoca Gallery

Jan
If you find Phoca extensions useful, please support the project
rorshack
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 13 Sep 2015, 15:18

Re: Frontend upload: strange behaviour on access check

Post by rorshack »

Hi Jan,
thank you for your answer but I was talking about Phoca Gallery not Phoca Download.
Could you help me?
User avatar
Benno
Phoca Hero
Phoca Hero
Posts: 9965
Joined: 04 Dec 2008, 11:58
Location: Germany
Contact:

Re: Frontend upload: strange behaviour on access check

Post by Benno »

Image

Kind regards,
Benno
Post Reply