current user Group assignments
Posted: Thu Jan 07, 2016 6:52 pm
Trying to find the appropriate reference for updating the navigation elements.
We want to allow some menu items to display only for specific group members, but I'm unsure how to call the current users' group membership in the code.
Seems like the AbleContext.Current.User should contain the GroupId, but efforts to call this continually fail.
The Admin link in the navigation simply calls the visibility based on the following code in StoreHeader.ascx:
I'd like to make other menu items comply with similar code
Any recommendations?
Thanks!
We want to allow some menu items to display only for specific group members, but I'm unsure how to call the current users' group membership in the code.
Seems like the AbleContext.Current.User should contain the GroupId, but efforts to call this continually fail.
The Admin link in the navigation simply calls the visibility based on the following code in StoreHeader.ascx:
Code: Select all
AdminLink.Visible = AbleContext.Current.User.IsAdmin;
Code: Select all
GroupLink.Visible = AbleContext.Current.User.GroupId = 14;
Thanks!