- Posts: 43
- Thank you received: 2
Where or How to set value for canChangeEventStatus set?
- Judy Akers
- Topic Author
- Offline
- Senior Member
Less
More
5 years 1 month ago #122993
by Judy Akers
Where or How to set value for canChangeEventStatus set? was created by Judy Akers
I need to suppress the Publish or Un-publish buttons, and looking at the code in com_eventbooking\themes\events\default.php file it looks like there is a configuration value set to control it - canChangeEventStatus.
Is this a general configuration setting, or set on a each event? Is this a permission settting that can be applied to a group?
Code from the file:
if (EventbookingHelperAcl::canChangeEventStatus($row->id))
{
if ($row->published == 1)
{
$link = JRoute::_('index.php?option=com_eventbooking&task=event.unpublish&id=' . $row->id . '&Itemid=' . $this->Itemid . '&return=' . $this->return, false);
$text = JText::_('EB_UNPUBLISH');
$class = 'icon-unpublish';
}
else
{
$link = JRoute::_('index.php?option=com_eventbooking&task=event.publish&id=' . $row->id . '&Itemid=' . $this->Itemid . '&return=' . $this->return, false);
$text = JText::_('EB_PUBLISH');
$class = 'icon-publish';
}
?>
Is this a general configuration setting, or set on a each event? Is this a permission settting that can be applied to a group?
Code from the file:
if (EventbookingHelperAcl::canChangeEventStatus($row->id))
{
if ($row->published == 1)
{
$link = JRoute::_('index.php?option=com_eventbooking&task=event.unpublish&id=' . $row->id . '&Itemid=' . $this->Itemid . '&return=' . $this->return, false);
$text = JText::_('EB_UNPUBLISH');
$class = 'icon-unpublish';
}
else
{
$link = JRoute::_('index.php?option=com_eventbooking&task=event.publish&id=' . $row->id . '&Itemid=' . $this->Itemid . '&return=' . $this->return, false);
$text = JText::_('EB_PUBLISH');
$class = 'icon-publish';
}
?>
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
5 years 1 month ago #123002
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Where or How to set value for canChangeEventStatus set?
Hello
It's permission setting. You can look at code the method canChangeEventStatus in the file components/com_eventbooking/helper/acl.php to understand the logic:
- Users with super admin permission can edit every events
- For other users they can only edit it the event if:
+ They are the creator of the event
+ They belong to a user group which is having edit state permission
(Go to Events Booking -> Configuration, click on Options button in the toolbar to change permission settings if you want)
Regards,
Tuan
It's permission setting. You can look at code the method canChangeEventStatus in the file components/com_eventbooking/helper/acl.php to understand the logic:
- Users with super admin permission can edit every events
- For other users they can only edit it the event if:
+ They are the creator of the event
+ They belong to a user group which is having edit state permission
(Go to Events Booking -> Configuration, click on Options button in the toolbar to change permission settings if you want)
Regards,
Tuan
Please Log in or Create an account to join the conversation.
- Judy Akers
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 43
- Thank you received: 2
5 years 1 month ago #123017
by Judy Akers
Replied by Judy Akers on topic Where or How to set value for canChangeEventStatus set?
Yes, that was it. I needed to change the permissions on the user group we created for the Event Coordinators. Thank you.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
5 years 1 month ago #123034
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Where or How to set value for canChangeEventStatus set?
Great, happy to hear that you can change it now
Tuan
Tuan
Please Log in or Create an account to join the conversation.
Moderators: Tuan Pham Ngoc
Support
Documentation
Information
Copyright © 2024 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.