Menu Items Missing for Administrators
I have a recently upgraded (4.4 -> 7.0) site, everything was working fine, but now, when I log into the backend as a user with administrator privileges the only thing that shows is "Dashboard". We use SSO via Ldap, and every user with the administrator role only sees "Dashboard". Other non-administrator users are unaffected. If I disable SSO via Ldap and login as an administrator in the Default Provider, I STILL only see "Dashboard". Other users in the Default provider are also unaffected.
Has anyone seen this behavior before?
Hello Mike,
Yes, this issue is indeed strange, a possible cause could be if the administrators role id in your SecurityConfig.config match another role (e.g. BackendUsers) in your database - you can find this in table [sf_roles]
You can try create an administrator user using the following script:
var userManager = UserManager.GetManager(
"Default"
);
System.Web.Security.MembershipCreateStatus status;
userManager.Provider.SuppressSecurityChecks =
true
;
var user = userManager.CreateUser(
"admin"
,
"password"
,
"admin@admin.com"
,
"Question"
,
"Answer"
,
true
,
null
,
out
status);
user.FirstName =
"FirstName"
;
user.LastName =
"LastName"
;
userManager.SaveChanges();
RoleManager roleManager = RoleManager.GetManager(
"AppRoles"
);
roleManager.Provider.SuppressSecurityChecks =
true
;
var role = roleManager.GetRole(
"Administrators"
);
roleManager.AddUserToRole(user, role);
roleManager.SaveChanges();