mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 03:25:23 +08:00
30 lines
894 B
C#
30 lines
894 B
C#
using System.Collections.Generic;
|
|
using JetBrains.Annotations;
|
|
using Orchard.Environment.Extensions.Models;
|
|
using Orchard.Security.Permissions;
|
|
|
|
namespace Orchard.Users {
|
|
[UsedImplicitly]
|
|
public class Permissions : IPermissionProvider {
|
|
public static readonly Permission ManageUsers = new Permission { Description = "Manage users", Name = "ManageUsers" };
|
|
|
|
public virtual Feature Feature { get; set; }
|
|
|
|
public IEnumerable<Permission> GetPermissions() {
|
|
return new[] {
|
|
ManageUsers,
|
|
};
|
|
}
|
|
|
|
public IEnumerable<PermissionStereotype> GetDefaultStereotypes() {
|
|
return new[] {
|
|
new PermissionStereotype {
|
|
Name = "Administrator",
|
|
Permissions = new[] {ManageUsers}
|
|
}
|
|
};
|
|
}
|
|
|
|
}
|
|
}
|