mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 03:25:23 +08:00
Getting some work towards being able to edit content types in to share the fun.
- includes changing settings from IDictionary<string, string> to SettingsDictionary : IDictionary<string, string> w/ GetModel<T> - also cleaned up content type creation a little --HG-- branch : dev
This commit is contained in:
@@ -3,15 +3,17 @@ using Orchard.Security.Permissions;
|
||||
|
||||
namespace Orchard.Core.Contents {
|
||||
public class Permissions : IPermissionProvider {
|
||||
public static readonly Permission CreateContentType = new Permission { Name = "CreateContentType", Description = "Create custom content type." };
|
||||
public static readonly Permission CreateContentTypes = new Permission { Name = "CreateContentTypes", Description = "Create custom content types." };
|
||||
public static readonly Permission EditContentTypes = new Permission { Name = "EditContentTypes", Description = "Edit content types." };
|
||||
|
||||
public string ModuleName {
|
||||
get { return "Contents"; }
|
||||
}
|
||||
|
||||
public IEnumerable<Permission> GetPermissions() {
|
||||
return new Permission[] {
|
||||
CreateContentType,
|
||||
return new [] {
|
||||
CreateContentTypes,
|
||||
EditContentTypes,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -19,7 +21,7 @@ namespace Orchard.Core.Contents {
|
||||
return new[] {
|
||||
new PermissionStereotype {
|
||||
Name = "Administrator",
|
||||
Permissions = new[] {CreateContentType}
|
||||
Permissions = GetPermissions()
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user