Where or How to set value for canChangeEventStatus set?

  • Judy Akers
  • Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
More
2 months 2 weeks ago #122993 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';
}
?>

Please Log in or Create an account to join the conversation.

More
2 months 2 weeks 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

Please Log in or Create an account to join the conversation.

  • Judy Akers
  • Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
More
2 months 2 weeks ago #123017 by Judy Akers
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.

More
2 months 2 weeks 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

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc