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

Edit button

4 yıl 5 ay önce #9775 Yazan: MULTINOVUM sp. z o.o.
Edit button, MULTINOVUM sp. z o.o. tarafından oluşturuldu
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?

Lütfen sohbete katılmak için Giriş ya da Hesap açın.

4 yıl 5 ay önce #9778 Yazan: Carl Fuentes
Carl Fuentes tarafından Edit button konusunda yanıtlandı
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.

Lütfen sohbete katılmak için Giriş ya da Hesap açın.

4 yıl 4 ay önce #9784 Yazan: MULTINOVUM sp. z o.o.
MULTINOVUM sp. z o.o. tarafından Edit button konusunda yanıtlandı
User is owner for sure.

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

Setting of permissions is not enough?

Lütfen sohbete katılmak için Giriş ya da Hesap açın.

Sayfa oluşturma süresi: 0.052 saniye
Geliştiren: Kunena Forum