mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-09-22 20:13:50 +08:00
Adding an extension manager events interface for enable/disable livecycle of modules. Adding a HackInstallationGenerator which produces Enabling/Enabled events for all modules on app startup. Adding a Roles module Enabled event handler that populates predefined roles with permission stereotypical permissions.
--HG-- extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4045231
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Orchard.Security.Permissions;
|
||||
|
||||
namespace Orchard.Core.Common {
|
||||
@@ -12,5 +13,14 @@ namespace Orchard.Core.Common {
|
||||
public IEnumerable<Permission> GetPermissions() {
|
||||
return new[] { ChangeOwner };
|
||||
}
|
||||
|
||||
public IEnumerable<PermissionStereotype> GetDefaultStereotypes() {
|
||||
return new[] {
|
||||
new PermissionStereotype {
|
||||
Name = "Administrators",
|
||||
Permissions = new[] {ChangeOwner}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Orchard.Security.Permissions;
|
||||
|
||||
namespace Orchard.Core.Themes {
|
||||
@@ -18,5 +19,9 @@ namespace Orchard.Core.Themes {
|
||||
InstallUninstallTheme
|
||||
};
|
||||
}
|
||||
|
||||
public IEnumerable<PermissionStereotype> GetDefaultStereotypes() {
|
||||
return Enumerable.Empty<PermissionStereotype>();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user