readonly lightbox for non owners

I want to implement something similiar to this post but based on the owner/creator of event
I am using the
scheduler.config.readonly_form = true to allow all users pure readonly, but i have a couple of users that will be able to create events, but i donot want those users to edit the other users events just view them.
I am using the following code to block edits but it will not let them see the event details
function readonly_check(id) {
var ev = this.getEvent(id);
if (ev == undefined)
return true;
return ev.userid == username;

            scheduler.attachEvent("onDblClick", readonly_check);

returning ‘false’ from onDblClick will prevent lightbox from showing.
what you need to do is changing readonly_form config dinamically, depending on event’s owner:

[code]scheduler.attachEvent(“onDblClick”, function(id){
//“readonly_form = false” for owners, “readonly_form = true” for others
scheduler.config.readonly_form = !readonly_check(id);

return true;//do not cancel ligthbox


Thank worked excellent