-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathPermissions.cs
40 lines (35 loc) · 1.27 KB
/
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
34
35
36
37
38
39
40
using System.Collections.Generic;
using Orchard.Environment.Extensions.Models;
using Orchard.Security.Permissions;
namespace Orchard.Gallery {
public class Permissions : IPermissionProvider {
public static readonly Permission ManageGallery = new Permission { Description = "Managing the Gallery", Name = "ManageGallery" };
public virtual Feature Feature { get; set; }
public IEnumerable<Permission> GetPermissions() {
return new[] {
ManageGallery,
};
}
public IEnumerable<PermissionStereotype> GetDefaultStereotypes() {
return new[] {
new PermissionStereotype {
Name = "Administrator",
Permissions = new[] { ManageGallery }
},
new PermissionStereotype {
Name = "Editor",
Permissions = new[] { ManageGallery }
},
new PermissionStereotype {
Name = "Moderator",
},
new PermissionStereotype {
Name = "Author"
},
new PermissionStereotype {
Name = "Contributor",
},
};
}
}
}