I am writing JavaScript that will show a menu item for the document ECB menu in a SharePoint document library. I want to only show the item if the current user has the ability to edit the item.
It appears that calling the "HasRights" function within core.js is the right move, but I cannot seem to find a definitive reference on what values I should use to call it with.
In looking through core.js I see an indication that the following is correct once in the context of a particular drop down.
HasRights(0x0, 0x4)
My tests also indicate that it is the right check. However, I would feel a lot better if there were some definition of this somewhere.
Also, does HasRights work for both SharePoint 2007 and SharePoint 2010? I am testing in SharePoint 2010 but need this to work in SharePoint 2007 as well.