You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
865 B
28 lines
865 B
using System;
|
|
|
|
namespace Infrastructure.Domain
|
|
{
|
|
[AttributeUsage(AttributeTargets.Class)]
|
|
public class ScopeAttribute : Attribute
|
|
{
|
|
public const ScopeType PlatformAll = ScopeType.PlatformRead | ScopeType.PlatformAdd | ScopeType.PlatformEdit | ScopeType.PlatformDelete;
|
|
public const ScopeType OrganAll = ScopeType.OrganRead | ScopeType.OrganAdd | ScopeType.OrganEdit | ScopeType.OrganDelete;
|
|
public const ScopeType UserAll = ScopeType.UserRead | ScopeType.UserAdd | ScopeType.UserEdit | ScopeType.UserDelete;
|
|
|
|
/// <summary>
|
|
/// 默认为PlatformAll
|
|
/// </summary>
|
|
public ScopeAttribute()
|
|
{
|
|
this.Scope = PlatformAll;
|
|
}
|
|
|
|
public ScopeAttribute(ScopeType scope)
|
|
{
|
|
this.Scope = scope;
|
|
}
|
|
|
|
public ScopeType Scope { get; }
|
|
}
|
|
}
|