mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-01-24 05:42:10 +08:00
ManageUsers, ManageRoles, AssignRoles and SiteSettings are new permission which makes it possible to have Administrators roles without the need of SiteOwner. Typical scenario: "super" account is SiteOwner "admin" account is Administrator without SiteOwner, but with ManageUsers, ManageRoles and SiteSettings but NOT AssignRoles
19 lines
729 B
C#
19 lines
729 B
C#
using Orchard.Localization;
|
|
using Orchard.Security;
|
|
using Orchard.UI.Navigation;
|
|
|
|
namespace Orchard.Users {
|
|
public class AdminMenu : INavigationProvider {
|
|
public Localizer T { get; set; }
|
|
public string MenuName { get { return "admin"; } }
|
|
|
|
public void GetNavigation(NavigationBuilder builder) {
|
|
builder.AddImageSet("users")
|
|
.Add(T("Users"), "11",
|
|
menu => menu.Action("Index", "Admin", new { area = "Orchard.Users" })
|
|
.Add(T("Users"), "1.0", item => item.Action("Index", "Admin", new { area = "Orchard.Users" })
|
|
.LocalNav().Permission(Permissions.ManageUsers)));
|
|
}
|
|
}
|
|
}
|