48 lines
1003 B
C#
48 lines
1003 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Microsoft.AspNetCore.Authorization
|
|
{
|
|
public class PermissionOperateAttribute : Attribute
|
|
{
|
|
public PermissionOperateAttribute(string name)
|
|
{
|
|
Name = name;
|
|
}
|
|
|
|
public PermissionOperateAttribute(string name, string operate)
|
|
{
|
|
Name = name;
|
|
Operate = operate;
|
|
}
|
|
|
|
public PermissionOperateAttribute(string name, Operate operate)
|
|
{
|
|
Name = name;
|
|
Operate = operate.ToString();
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取权限名称
|
|
/// </summary>
|
|
public string Name { get; private set; } = null!;
|
|
|
|
public string Operate { get; private set; } = null!;
|
|
}
|
|
|
|
public enum Operate
|
|
{
|
|
None,
|
|
Find,
|
|
Print,
|
|
Insert,
|
|
Update,
|
|
Delete,
|
|
Submit,
|
|
Approval
|
|
}
|
|
}
|