×
Please submit new Bug Reports on GitHub: github.com/Jensen-Technologies/component-creator-issues/issues
Edit button
MULTINOVUM sp. z o.o.
Nouveau membre
Posts: 15
il y a 4 ans 4 mois #9775
par MULTINOVUM sp. z o.o.
Edit button a été créé par MULTINOVUM sp. z o.o.
When user create item, and parameters is set to "can adit own", he should see EDIT button below single item, but there is no button (he see edid icon on list items, but not in single item).
I fixed it change this:
$canEdit = JFactory::getUser()->authorise('core.edit', 'com_mycomponent.' . $this->item->id);
if (!$canEdit && JFactory::getUser()->authorise('core.edit.own', 'com_mycomponent' . $this->item->id))
{
$canEdit = JFactory::getUser()->id == $this->item->created_by;
}
to this:
$canEdit = JFactory::getUser()->authorise('core.edit', 'com_mycomponent.' . $this->item->id);
if (!$canEdit && JFactory::getUser()->authorise('core.edit.own', 'com_mycomponent.' . $this->item->id))
{
$canEdit = JFactory::getUser()->id == $this->item->created_by;
}
(I add dot after 'com_mycomponent)
and now user can see that EDIT button
Am I correct?
Is this bug on Component Creator?
I fixed it change this:
$canEdit = JFactory::getUser()->authorise('core.edit', 'com_mycomponent.' . $this->item->id);
if (!$canEdit && JFactory::getUser()->authorise('core.edit.own', 'com_mycomponent' . $this->item->id))
{
$canEdit = JFactory::getUser()->id == $this->item->created_by;
}
to this:
$canEdit = JFactory::getUser()->authorise('core.edit', 'com_mycomponent.' . $this->item->id);
if (!$canEdit && JFactory::getUser()->authorise('core.edit.own', 'com_mycomponent.' . $this->item->id))
{
$canEdit = JFactory::getUser()->id == $this->item->created_by;
}
(I add dot after 'com_mycomponent)
and now user can see that EDIT button
Am I correct?
Is this bug on Component Creator?
Connexion ou Créer un compte pour participer à la conversation.
Carl Fuentes
Modérateur
Posts: 28
il y a 4 ans 4 mois #9778
par Carl Fuentes
Réponse de Carl Fuentes sur le sujet Edit button
It was incorrect to add "." into the code.
I have tested this function and it worked as it should.
Can you make sure that user trying to edit the item is the owner of the item. Also make sure checked out of item for the edit button to show.
I have tested this function and it worked as it should.
Can you make sure that user trying to edit the item is the owner of the item. Also make sure checked out of item for the edit button to show.
Connexion ou Créer un compte pour participer à la conversation.
MULTINOVUM sp. z o.o.
Nouveau membre
Posts: 15
il y a 4 ans 4 mois #9784
par MULTINOVUM sp. z o.o.
Réponse de MULTINOVUM sp. z o.o. sur le sujet Edit button
User is owner for sure.
Is there any special function to show or hide EDIT button?
Setting of permissions is not enough?
Is there any special function to show or hide EDIT button?
Setting of permissions is not enough?
Connexion ou Créer un compte pour participer à la conversation.
Emmanuel Tsalampounis
Visiteur
il y a 3 ans 7 mois #9836
par Emmanuel Tsalampounis
Réponse de Emmanuel Tsalampounis sur le sujet Edit button
Please create a bug report at: github.com/aDaneInSpain/component-creator-issues
with your component name and the environment that you are testing in order to see if it's a bug or something wrong on your configuration.
with your component name and the environment that you are testing in order to see if it's a bug or something wrong on your configuration.
Connexion ou Créer un compte pour participer à la conversation.
Temps de génération de la page : 0.057 secondes