how to hide some options in Edit Control Block based on user permissions.

Jan 20 2012 8:06 AM
Hi everybody,

I had a Documnet library, i placed in my page. That is listviewr webpart.

I had different groups with diferent permision levels.

Ex: if i had Admin rights for that site then i want to show all the options in the Edit Control Block of Item.

If had only Contribute permissions for that site, then i dont want to show Delete option in the ECB. I want to hide/delete based on the permission levels.

How to do it with Sharepoint object model or by using sctripting.