using System;
using Abp.Application.Services;
namespace Abp.Authorization
{
///
/// This attribute is used on a method of an Application Service (A class that implements )
/// to make that method usable only by authorized users.
///
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true)]
public class AbpAuthorizeAttribute : Attribute, IAbpAuthorizeAttribute
{
///
/// A list of permissions to authorize.
///
public string[] Permissions { get; }
///
/// If this property is set to true, all of the must be granted.
/// If it's false, at least one of the must be granted.
/// Default: false.
///
public bool RequireAllPermissions { get; set; }
///
/// Creates a new instance of class.
///
/// A list of permissions to authorize
public AbpAuthorizeAttribute(params string[] permissions)
{
Permissions = permissions;
}
}
}