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

Edit button

4 jaren 4 maanden geleden #9775 door MULTINOVUM sp. z o.o.
Edit button werd gestart door 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?

Gelieve Inloggen of een account aanmaken om deel te nemen aan het gesprek.

4 jaren 4 maanden geleden #9778 door Carl Fuentes
Beantwoord door Carl Fuentes in topic 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.

Gelieve Inloggen of een account aanmaken om deel te nemen aan het gesprek.

4 jaren 4 maanden geleden #9784 door MULTINOVUM sp. z o.o.
Beantwoord door MULTINOVUM sp. z o.o. in topic Edit button
User is owner for sure.

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

Setting of permissions is not enough?

Gelieve Inloggen of een account aanmaken om deel te nemen aan het gesprek.

3 jaren 7 maanden geleden #9836 door Emmanuel Tsalampounis
Beantwoord door Emmanuel Tsalampounis in topic 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.

Gelieve Inloggen of een account aanmaken om deel te nemen aan het gesprek.

Tijd voor maken pagina: 0.053 seconden
Gemaakt door 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.