mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00

The code used to deal with Modules as the basic unit and needed to be updated to work with "Features" instead, since features are the basic units than can be enabled/disabled. --HG-- branch : dev
27 lines
866 B
C#
27 lines
866 B
C#
using System.Collections.Generic;
|
|
using Orchard.Environment.Extensions.Models;
|
|
using Orchard.Security.Permissions;
|
|
|
|
namespace Orchard.Core.Navigation {
|
|
public class Permissions : IPermissionProvider {
|
|
public static readonly Permission ManageMainMenu = new Permission { Name = "ManageMainMenu", Description = "Manage main menu" };
|
|
|
|
public virtual Feature Feature { get; set; }
|
|
|
|
public IEnumerable<Permission> GetPermissions() {
|
|
return new[] {
|
|
ManageMainMenu
|
|
};
|
|
}
|
|
|
|
public IEnumerable<PermissionStereotype> GetDefaultStereotypes() {
|
|
return new[] {
|
|
new PermissionStereotype {
|
|
Name = "Administrator",
|
|
Permissions = new[] {ManageMainMenu}
|
|
}
|
|
};
|
|
}
|
|
}
|
|
}
|