×
Please submit new Bug Reports on GitHub: github.com/Jensen-Technologies/component-creator-issues/issues
Add permission not working
Mark van Beek
Yeni Üye
Posts: 2
2 yıl 5 ay önce - 2 yıl 5 ay önce #9970
Yazan: Mark van Beek
Add permission not working, Mark van Beek tarafından oluşturuldu
Hi,
My component is working fine except for the ADD (new) button in my list and the ADD new from menu-item. This throws a permission error.
I've configured the component-permissions as if user "333" can create content in the component but it doesn't work properly.
Activating the "aDD"-button or creating a "ADD" menu-entry results in an permission error.
Seems the "create"-permission is not separately implemented yet in J4 CC?
Anyone a clue? Pls. see my attachments.
Thanks in advance.
Mark
Steps to reproduce the issue:
- create "registered" user
- Set component permission to "allow create" for registered users
- create a menu-entry to add a new component-item in the front-end
- login to front-end as registered user
- activate add-menu-item to add new component-item or activate "ADD" button on list-page
Expected result
- empty add-form to add a new component-item
Actual result
- permission error
The ADD-permission is only granted ie effectuated if the components permission is also set to "Allow Edit" ...
I think the code to change for this is in the singular components page at (com_/form/default.php
At line 44 at about following structure should be reconsidered I guess:
<?php if (!$canEdit) : ?>
<h3>
<?php throw new \Exception(Text::_('COM_ELVB_ERROR_MESSAGE_NOT_AUTHORISED'), 403); ?>
</h3>
<?php else : ?>
<?php if (!empty($this->item->id)): ?>
<h1><?php echo Text::sprintf('COM_ELVB_EDIT_ITEM_TITLE', $this->item->id); ?></h1>
<?php else: ?>
<h1><?php echo Text::_('COM_ELVB_ADD_ITEM_TITLE'); ?></h1>
<?php endif; ?>
My component is working fine except for the ADD (new) button in my list and the ADD new from menu-item. This throws a permission error.
I've configured the component-permissions as if user "333" can create content in the component but it doesn't work properly.
Activating the "aDD"-button or creating a "ADD" menu-entry results in an permission error.
Seems the "create"-permission is not separately implemented yet in J4 CC?
Anyone a clue? Pls. see my attachments.
Thanks in advance.
Mark
Steps to reproduce the issue:
- create "registered" user
- Set component permission to "allow create" for registered users
- create a menu-entry to add a new component-item in the front-end
- login to front-end as registered user
- activate add-menu-item to add new component-item or activate "ADD" button on list-page
Expected result
- empty add-form to add a new component-item
Actual result
- permission error
The ADD-permission is only granted ie effectuated if the components permission is also set to "Allow Edit" ...
I think the code to change for this is in the singular components page at (com_/form/default.php
At line 44 at about following structure should be reconsidered I guess:
<?php if (!$canEdit) : ?>
<h3>
<?php throw new \Exception(Text::_('COM_ELVB_ERROR_MESSAGE_NOT_AUTHORISED'), 403); ?>
</h3>
<?php else : ?>
<?php if (!empty($this->item->id)): ?>
<h1><?php echo Text::sprintf('COM_ELVB_EDIT_ITEM_TITLE', $this->item->id); ?></h1>
<?php else: ?>
<h1><?php echo Text::_('COM_ELVB_ADD_ITEM_TITLE'); ?></h1>
<?php endif; ?>
Son Düzenleme: 2 yıl 5 ay önce Düzenleyen:Mark van Beek
Lütfen sohbete katılmak için Giriş ya da Hesap açın.
Mark van Beek
Yeni Üye
Posts: 2
2 yıl 5 ay önce #9971
Yazan: Mark van Beek
Mark van Beek tarafından Add permission not working konusunda yanıtlandı
Fixed by the CC-team
Lütfen sohbete katılmak için Giriş ya da Hesap açın.
Sayfa oluşturma süresi: 0.059 saniye