Set event read-only on the server side

Hi,
First of all i want to thank you for this great product.
Ok, so what i want to achieve is this :
I have a bunch of events, a person can view many events even if he didn’t add them but he can only edit the events that were added by him.
Is there a way to add a read-only property to the returned data from the server in order to make the event read-only.

For example the last row in the json has a property readonly equals to true so it should be rendered on the client side as a readonly.

 {text:"Meeting",    start_date:"04/11/2013 14:00", end_date:"04/11/2013 17:00"},
{text:"Conference", start_date:"04/15/2013 12:00", end_date:"04/18/2013 19:00"},
{text:"Interview",  start_date:"04/24/2013 09:00", end_date:"04/24/2013 10:00", readonly: true}

Hello,

Have you checked out sample samples/03_extensions/14_readonly_event.html ?

From what I’m seeing scheduler.getEvent(id) is returns task information. So your “readonly” attribute should be returned as well.

Yep, the above is correct and you can one of events to block edit operations for event with such property.

For example, you can check samples\08_shared_events\user_1_combined.html, it uses similar strategy.

My bad, my question wasn’t clear enough, it’s not the client side that bugs me but the server side.
But after i checked the php connector docs i found out about the beforeRender event.
So here we go this is the snippet of how i made it work

//The callback
function readonlyCallback($row)
{
	if(Some fancy condition to make the event readonly)
		$row->set_userdata('readonly', 'true');
}

//Event binding
$conn->event->attach("beforeRender","readonlyCallback");

So what you need to make an event readonly from the server side is to attach a userdata to it with the readonly == true