I was recently asked by a client how you could do something similar. My response to this made the following assumptions:
- I would have a group or several groups of users that I need to disable their ability to (un)publish a defined set of pages
- The only place I needed to limit the users ability to (un)publish was in the UI
My response contunued with the following thoughts
I would set up a Category/Keyword combination that Represented a structure similar to the following:
- CAT:
LimitPagePublishing
- KW: SelfServe Users
- KW: HomePage
- KW: ProductX
The CAT is my configuration entry point. The KW for SelfServe Users is a known group in my content manager. The children of "SelfServe Users" are the page names or tcmuri of the pages that I do not want this user to be able to publish.
I would create a GUI extension that uses a WebService (using the core-service) that would apply the logic of finding out if the user is a member of a group that does not have rights to the selected item(s) and hiding the publish/unpublish context menu items if they did.
The GUI extension would find out what groups the user is a member of, then check the LimitPagePublishing (CAT) to see if the users is a member of a listed group. If they are then check to see if the selected item(s) exist(s) in the matching KW for the group(s). If the item is, then hide the menu items.
Something to be aware of is if I select an item (component) that resolves to (un)publishing of a page listed in teh Category/Keywords I need to include a resolve items method in my WebService.
There are more things to think about in this scenario but, it is feasible to accomplish this with a GUI extension and a Core Service WebService.