diff options
-rw-r--r-- | Zotlabs/Module/Channel_calendar.php | 5 | ||||
-rw-r--r-- | view/tpl/cdav_calendar.tpl | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/Zotlabs/Module/Channel_calendar.php b/Zotlabs/Module/Channel_calendar.php index 6741d611c..7fa03fb34 100644 --- a/Zotlabs/Module/Channel_calendar.php +++ b/Zotlabs/Module/Channel_calendar.php @@ -147,6 +147,11 @@ class Channel_calendar extends \Zotlabs\Web\Controller { } return; } + + if($x[0]['event_xchan'] !== $channel['xchan_hash']) { + notice( t('Not allowed.') . EOL); + return; + } $acl->set($x[0]); diff --git a/view/tpl/cdav_calendar.tpl b/view/tpl/cdav_calendar.tpl index 8b91275ee..827c57b96 100644 --- a/view/tpl/cdav_calendar.tpl +++ b/view/tpl/cdav_calendar.tpl @@ -322,7 +322,11 @@ $(document).ready(function() { $('#id_categories').tagsinput('add', '{{$categories}}'), $('#id_description').val(resource.description); $('#id_location').val(resource.location); - $('#event_submit').html('{{$update}}'); + + if(resource.event_xchan !== '{{$channel_hash}}') + $('#event_submit').hide(); + else + $('#event_submit').html('{{$update}}'); } }); |