- Posts: 14
- Thank you received: 1
The developer takes a few days off for Summer vacation...
...and will be back with charged battery!
From 1st August to 10th August, 2026 included
During this period, assistance from developer will not be provided.
NEWS: iCagenda 4.1.0-alpha1 will be available for testing for users with a PRO subscription
by the end of August!
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
use VersionableControllerTrait;protected function allowEdit($data = [], $key = 'id')
{
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
$user = $this->app->getIdentity();
// Zero record (id:0), return component edit permission by calling parent controller method
if (!$recordId) {
return parent::allowEdit($data, $key);
}
// Check edit on the record asset (explicit or inherited)
if ($user->authorise('core.edit', 'com_icagenda.event.' . $recordId)) {
return true;
}
// Check edit own on the record asset (explicit or inherited)
if ($user->authorise('core.edit.own', 'com_icagenda.event.' . $recordId)) {
// Existing record already has an owner, get it
$record = $this->getModel()->getItem($recordId);
if (empty($record)) {
return false;
}
// Grant if current user is owner of the record
return $user->id == $record->created_by;
}
return false;
}
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
// Grant if current user is owner of the record
if ($user->id == $record->created_by || $user->id == $record->userid) {
return true;
}
Please Log in or Create an account to join the conversation.

