/
Permissions.cs
33 lines (28 loc) · 973 Bytes
/
Permissions.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#region Using
using System.Collections.Generic;
using Orchard.Environment.Extensions.Models;
using Orchard.Security.Permissions;
#endregion
namespace Yaplex.SEO {
public class Permissions : IPermissionProvider {
public static readonly Permission ManageRobots = new Permission {
Description = "Manage robots.txt",
Name = nameof(ManageRobots)
};
private static readonly Permission[] permissions = {ManageRobots};
#region IPermissionProvider Members
public IEnumerable<PermissionStereotype> GetDefaultStereotypes() {
return new[] {
new PermissionStereotype {
Name = "Administrator",
Permissions = permissions
}
};
}
public IEnumerable<Permission> GetPermissions() {
return permissions;
}
public virtual Feature Feature { get; set; }
#endregion
}
}