readonly lightbox for non owners

I want to implement something similiar to this post but based on the owner/creator of event
viewtopic.php?f=25&t=24716
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;
else
return ev.userid == username;

            }
            scheduler.attachEvent("onDblClick", readonly_check);

Hi,
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

});[/code]

Thank worked excellent