mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-26 12:03:16 +08:00
LF is the git default and all new files are stored as such. Old files from the hg to git conversion however were moved over as CRLF.
31 lines
971 B
C#
31 lines
971 B
C#
using System.Collections.Generic;
|
|
using Orchard.Environment.Extensions.Models;
|
|
using Orchard.Security.Permissions;
|
|
|
|
namespace Orchard.Autoroute {
|
|
public class Permissions : IPermissionProvider {
|
|
public static readonly Permission SetHomePage = new Permission { Description = "Set Home Page", Name = "SetHomePage" };
|
|
|
|
public virtual Feature Feature { get; set; }
|
|
|
|
public IEnumerable<Permission> GetPermissions() {
|
|
return new[] {
|
|
SetHomePage
|
|
};
|
|
}
|
|
|
|
public IEnumerable<PermissionStereotype> GetDefaultStereotypes() {
|
|
return new[] {
|
|
new PermissionStereotype {
|
|
Name = "Administrator",
|
|
Permissions = new[] {SetHomePage}
|
|
},
|
|
new PermissionStereotype {
|
|
Name = "Editor",
|
|
Permissions = new[] {SetHomePage}
|
|
}
|
|
};
|
|
}
|
|
|
|
}
|
|
} |