Frontend upload: strange behaviour on access check
Posted: 28 Aug 2015, 10:28
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
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
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 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
