do not allow editing events that do not belong to us
This commit is contained in:
parent
0b062d0b8a
commit
a04689b784
@ -148,6 +148,11 @@ class Channel_calendar extends \Zotlabs\Web\Controller {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($x[0]['event_xchan'] !== $channel['xchan_hash']) {
|
||||||
|
notice( t('Not allowed.') . EOL);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$acl->set($x[0]);
|
$acl->set($x[0]);
|
||||||
|
|
||||||
$created = $x[0]['created'];
|
$created = $x[0]['created'];
|
||||||
|
@ -322,7 +322,11 @@ $(document).ready(function() {
|
|||||||
$('#id_categories').tagsinput('add', '{{$categories}}'),
|
$('#id_categories').tagsinput('add', '{{$categories}}'),
|
||||||
$('#id_description').val(resource.description);
|
$('#id_description').val(resource.description);
|
||||||
$('#id_location').val(resource.location);
|
$('#id_location').val(resource.location);
|
||||||
$('#event_submit').html('{{$update}}');
|
|
||||||
|
if(resource.event_xchan !== '{{$channel_hash}}')
|
||||||
|
$('#event_submit').hide();
|
||||||
|
else
|
||||||
|
$('#event_submit').html('{{$update}}');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user