Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I recently edited my organization's intranet site by creating a JavaScript file which utilizes jQuery v.8 and jQuery UI. My custom JS creates an unordered list with site navigation that has drop downs to sublinks with jQuery animations. The reason for this instead of SharePoints navigation tag is because our intranet has tons of masterpages, so instead of having to change each and every masterpage when a new link is added, you only add it to the JS and since each masterpage is referencing my custom JS file, the navigation will be created.

My problem is, after implementing this, certain users who used to have access to a subsite reserved for managers no longer have direct access. Strangely though, when the Access Denied.aspx page is displayed, there is a link to go back to the Site, and when clicked will take the user to the correct spot in the subsite. Users with Full Control have no problem accessing the site through the menu. Most of the user's for this subsite are stored in Active Directory groups, and those AD groups are assigned permissions. The AD groups assigned are given Limited Access.

In my custom masterpage template, I deleted the old SharePoint tag for navigation and inserted a blank div tag with which my JS uses to create the navigation. This div tag is not placed in the same spot as the old SharePoint tag, but a little higher up, right before div with class of "s4-lp s4-toplinks"

Just wondering if anyone had any ideas with regards to permissions and custom navigation menus. For legal reasons I cannot show code, but I can explain the best I can if anyone should ask.

Thanks

share|improve this question
add comment

2 Answers

If I were you I would keep all the jquery menu code you have. But swap out the hardcoded links for list driven ones. This shouldn't be too bad... I assume you are storing your links in a javascript array or something. So instead, use the REST API to get your links from a SharePoint list.

Then you can add item level permissions to each link, and the REST API is security trimmed so users will only see link items that they have access too.

Ideally you would override the TopNavigation delegate control, or create your own user control that queries a list, but since you have all this client side code done already, it would probably be easiest to just use the REST api.

share|improve this answer
    
Thanks for the reply. It's the weirdest thing, because when using certain user's account and logging into a terminal server, the menu works just fine. It's only on their PC's that they can't seem to get in right away. I'll certainly try the REST approach. My JS is building <a> tags and assigning the link there, but I can certainly try the list approach. –  user2063134 Mar 7 '13 at 2:33
add comment
up vote 0 down vote accepted

I answered my question in the stupidest of fashions. I started developing a REST solution like andrew.petersen15 suggested, but as one last, desperate attempt I went into my layouts folder where the JS is stored, and re-saved it (didn't update any code, didn't remove anything, didn't add anything) -- NOTHING! I then cleared the cache out of the user's internet and what do you know, it worked. WTF?!

As far as I know it had nothing to do with permissions (they were all set up properly in the beginning), it was with the individual's cache and re-saving the JS file.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.