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

Edit button

4 Jahre 4 Monate her #9775 von MULTINOVUM sp. z o.o.
Edit button wurde erstellt von 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?

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

4 Jahre 4 Monate her #9778 von Carl Fuentes
Carl Fuentes antwortete auf 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.

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

4 Jahre 4 Monate her #9784 von MULTINOVUM sp. z o.o.
MULTINOVUM sp. z o.o. antwortete auf Edit button
User is owner for sure.

Is there any special function to show or hide EDIT button?

Setting of permissions is not enough?

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

3 Jahre 7 Monate her #9836 von Emmanuel Tsalampounis
Emmanuel Tsalampounis antwortete auf 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.

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Ladezeit der Seite: 0.049 Sekunden
Powered by Kunena Forum

Wir verwenden eigene Cookies und Cookies von Drittanbietern, um Ihr Nutzererlebnis zu verbessern und Ihnen einen optimalen Service zu bieten. Wenn Sie die Website weiter nutzen, gehen wir davon aus, dass Sie mit unserer Cookie-Politik einverstanden sind.