The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
|
|
Restricting access to NavBar items
Posted: 09 Jun 10 4:21 AM
|
Hi All,
what is the best method for restricting access to a navbar/items on a navbar depending on what department the logged on user is in?
e.g we only want users in the Marketing department to be able to see the Marketing navbar.
e.g we may want all users to see a navbar but only make certain items on it enabled for specified usernames/departments...etc
Thanks All. |
|
|
| |
| |
| |
|
Re: Restricting access to NavBar items
Posted: 10 Jun 10 4:47 AM
|
Hi Guys,
Ive used Nicks reply and have made dll im ready to test. Ive added the dll into the Bin folder but Ryan's article also says to add the module into the Modules tab of the portal itself. Not quite sure what that second part means???
When i try to add a module into the portal i cant find what i have created in the list. |
|
|
|
Re: Restricting access to NavBar items
Posted: 10 Jun 10 6:34 AM
|
Never mind all i can see it now. Has anyone tried doing this but hiding the menu item by the users department rather than team? |
|
|
|
Re: Restricting access to NavBar items
Posted: 10 Jun 10 7:58 AM
|
Got all this working now guys thanks for pointing me in the right direction.
Woud anyone be able to help me do this sort of thing but with NavBar items?
So as things stand i can hide the Tools menu items now for people who arent in a particular department but i need to hide the Campaign navbar button on the Marketing navbar if the user is not in the Marketing department. |
|
|
|
Re: Restricting access to NavBar items
Posted: 10 Jun 10 9:06 AM
|
i tried the following but it doesnt seem to work:
NavWorkspace navbar = _parentWorkItem.Workspaces["NavBar"] as NavWorkspace; if (navbar == null) return; IMenuService navmenusvc = navbar.WorkItem.Services.Get(); if (navmenusvc == null) return; NavItemCollection navcol2 = (NavItemCollection)navmenusvc.FindMenu("navMarketing") as NavItemCollection; if (navcol2 != null) { navcol2.RemoveItem("navEntitiesCampaign"); } |
|
|
|