× Please submit new Bug Reports on GitHub: github.com/Jensen-Technologies/component-creator-issues/issues

ACL for specific item not working

il y a 9 ans 9 mois - il y a 9 ans 9 mois #630 par Roman
ACL for specific item not working a été créé par Roman
Hi all,
If I change ACL of specific item - I have no difference.
If I change ACL of component - works fine, but only in the list view. Also in this case users can edit all items.
As I see, for usergroup ( in item ACL - permission: Allow edit) parameter $canEdit is empty:(  
$canEdit = JFactory :: getUser () -> authorise ('core.edit', 'com_mycomponent.'. $ this-> item-> id);
(in file: components/com_[ComponentName]/views/[SingleViewName]/tmpl/default.php - line 12) 
So, ACL of specific item not working for me. What I need to do to take effect?
- clean Joomla 3.3.6
- component code wasn't changed.
- parent of usergroup "Registered" 
Thanks,
Dernière édition: il y a 9 ans 9 mois par Roman. Raison: text correcting

Connexion ou Créer un compte pour participer à la conversation.

il y a 9 ans 9 mois #631 par Roman
Réponse de Roman sur le sujet ACL for specific item not working
Ok, I found it.
After experiments with table and views, something wasn't updated.
in particular:
$canEdit = JFactory :: getUser () -> authorise ('core.edit', 'com_mycomponent.'. $ this-> item-> id);
- not working
but
$canEdit = JFactory :: getUser () -> authorise ('core.edit', 'com_mycomponent.viewName.'. $ this-> item-> id);
 - working fine.
 I'll recreate this component.
Regards,

Connexion ou Créer un compte pour participer à la conversation.

il y a 9 ans 9 mois #632 par Roman
Réponse de Roman sur le sujet ACL for specific item not working
Oops,
After recreating the problem not gone.

I found 2  mismatch at lines 12 and 13 in file
 components/com_[ComponentName]/views/[SingleViewName]/tmpl/default.php
com_mycomponent.
instead of 
com_mycomponent.viewname.

For example, in this file at line 84 (delete button) wirking fine
Please, fix it.

Regards,

Connexion ou Créer un compte pour participer à la conversation.

il y a 9 ans 9 mois #642 par Roman
Réponse de Roman sur le sujet ACL for specific item not working
Update.
Get 500 Error when save item at frontend (when edit permissions granted only in Item's ACL)
configuration:
- joomla 3.3.6 (clean)
- user in group Registered
- Editing permissions for user:
-- ACL global: inherit;
-- ACL of component: inherit;
-- ACL of item: allow edit and change state);

As I understand, this error generated in file [componentName]/models/[model]Forms.php
in task 
public function &getData($id = null)
at line 92
if (!$canEdit) {
   JError::raiseError('500', JText::_('JERROR_ALERTNOAUTHOR'));
 }
What I need to change to avoid this error?

PS: maybe it help -  noticed that if change this code as shown below, comment of my error is empty :(
if (!$canEdit) {
   JError::raiseError('500', $id);// comment of error replaced to  $id
 }
Thanks,

Connexion ou Créer un compte pour participer à la conversation.

il y a 9 ans 9 mois #644 par Andres Maeso
Réponse de Andres Maeso sur le sujet ACL for specific item not working
Hi Roman

Thanks for reporting this, we will take a look and see what happens. Please, if you find any other bug, send it to Cette adresse e-mail est protégée contre les robots spammeurs. Vous devez activer le JavaScript pour la visualiser.

Regards,

Andrés.

Andrés Maeso
Customer relations manager at Joomla Component Creator.

Cette adresse e-mail est protégée contre les robots spammeurs. Vous devez activer le JavaScript pour la visualiser.

Connexion ou Créer un compte pour participer à la conversation.

Temps de génération de la page : 0.062 secondes
Propulsé par Kunena

We use cookies so that you can place orders and we can provide a better service. You can control the use of cookies at the individual browser level. If you reject cookies, you may still use our website, but your ability to use some features or areas of our website may be limited.