Update default roles to work with Features

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
This commit is contained in:
Renaud Paquay
2010-07-27 15:59:38 -07:00
parent 49a697f641
commit 10dd2dcc4b
27 changed files with 81 additions and 102 deletions

View File

@@ -1,4 +1,5 @@
using System.Collections.Generic;
using Orchard.Environment.Extensions.Models;
using Orchard.Security.Permissions;
namespace Orchard.Media {
@@ -6,11 +7,7 @@ namespace Orchard.Media {
public static readonly Permission ManageMediaFiles = new Permission { Description = "Modifying Media Files", Name = "ManageMediaFiles" };
public static readonly Permission UploadMediaFiles = new Permission { Description = "Uploading Media Files", Name = "UploadMediaFiles", ImpliedBy = new[] { ManageMediaFiles } };
public string ModuleName {
get {
return "Media";
}
}
public virtual Feature Feature { get; set; }
public IEnumerable<Permission> GetPermissions() {
return new Permission[] {