Reputation: 15253
I'd like to create a Web Part with security-trimmed links for a MOSS Publishing Intranet Portal. The idea is that their logged-in user name is checked against a custom provider to determine their permissions for a particular link and the hyperlinks would be rendered based on this.
What would be a good approach for something like this? In particular, is it possible to inherit from the "Summary Links" Web Part to achieve this functionality?
Upvotes: 1
Views: 462
Reputation: 15253
The solution to this was to create a custom xml file with an attribute indicating if roles were applied or not for a particular application link - and if so, another attribute containing the role name. The code would then check the custom membership store using the logged-in users network identity for authorization checking.
Upvotes: 0
Reputation: 1339
If you don't have to have the custom provider to check permissions, you could just apply SharePoint permissions to the individual items in a list. Then, the list views would be trimmed automatically. Also, if you wanted to write your own web part to display them, you could use a CAML query to retrieve the items, and the results would also automatically be trimmed by the current user's permissions.
If you do have to use a custom provider for permissions, I'm not much help. ;-)
Upvotes: 1