Class RequiresPermissionAttribute
Attribute indicating the required permission to access/execute/use the decorated element.
Inheritance
System.Object
System.Attribute
RequiresPermissionAttribute
Inherited Members
System.Attribute.Equals(System.Object)
System.Attribute.GetCustomAttribute(System.Reflection.Assembly, System.Type)
System.Attribute.GetCustomAttribute(System.Reflection.Assembly, System.Type, System.Boolean)
System.Attribute.GetCustomAttribute(System.Reflection.MemberInfo, System.Type)
System.Attribute.GetCustomAttribute(System.Reflection.MemberInfo, System.Type, System.Boolean)
System.Attribute.GetCustomAttribute(System.Reflection.Module, System.Type)
System.Attribute.GetCustomAttribute(System.Reflection.Module, System.Type, System.Boolean)
System.Attribute.GetCustomAttribute(System.Reflection.ParameterInfo, System.Type)
System.Attribute.GetCustomAttribute(System.Reflection.ParameterInfo, System.Type, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.Assembly)
System.Attribute.GetCustomAttributes(System.Reflection.Assembly, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.Assembly, System.Type)
System.Attribute.GetCustomAttributes(System.Reflection.Assembly, System.Type, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo)
System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo, System.Type)
System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo, System.Type, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.Module)
System.Attribute.GetCustomAttributes(System.Reflection.Module, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.Module, System.Type)
System.Attribute.GetCustomAttributes(System.Reflection.Module, System.Type, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo)
System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo, System.Type)
System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo, System.Type, System.Boolean)
System.Attribute.GetHashCode()
System.Attribute.IsDefaultAttribute()
System.Attribute.IsDefined(System.Reflection.Assembly, System.Type)
System.Attribute.IsDefined(System.Reflection.Assembly, System.Type, System.Boolean)
System.Attribute.IsDefined(System.Reflection.MemberInfo, System.Type)
System.Attribute.IsDefined(System.Reflection.MemberInfo, System.Type, System.Boolean)
System.Attribute.IsDefined(System.Reflection.Module, System.Type)
System.Attribute.IsDefined(System.Reflection.Module, System.Type, System.Boolean)
System.Attribute.IsDefined(System.Reflection.ParameterInfo, System.Type)
System.Attribute.IsDefined(System.Reflection.ParameterInfo, System.Type, System.Boolean)
System.Attribute.Match(System.Object)
System.Attribute.TypeId
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Kephas.Security.Authorization.AttributedModel
Assembly: Kephas.Core.dll
Syntax
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface | AttributeTargets.Property, AllowMultiple = true, Inherited = false)]
public class RequiresPermissionAttribute : Attribute
Constructors
| Improve this Doc View SourceRequiresPermissionAttribute(String[])
Initializes a new instance of the RequiresPermissionAttribute class.
Declaration
public RequiresPermissionAttribute(params string[] permissions)
Parameters
Type | Name | Description |
---|---|---|
System.String[] | permissions | A variable-length parameters list containing the required permissions. |
RequiresPermissionAttribute(Type[])
Initializes a new instance of the RequiresPermissionAttribute class.
Declaration
public RequiresPermissionAttribute(params Type[] permissions)
Parameters
Type | Name | Description |
---|---|---|
System.Type[] | permissions | A variable-length parameters list containing the required permissions. |
Fields
| Improve this Doc View SourcePermissionsMetadataKey
The permissions metadata key.
Declaration
public const string PermissionsMetadataKey = "RequiresPermissions"
Field Value
Type | Description |
---|---|
System.String |
PermissionTypesMetadataKey
The permission types metadata key.
Declaration
public const string PermissionTypesMetadataKey = "RequiresPermissionTypes"
Field Value
Type | Description |
---|---|
System.String |
Properties
| Improve this Doc View SourcePermissions
Gets the required permissions.
Declaration
[MetadataValue("RequiresPermissions")]
public string[] Permissions { get; }
Property Value
Type | Description |
---|---|
System.String[] | The required permissions. |
PermissionTypes
Gets the types of the required permissions.
Declaration
[MetadataValue("RequiresPermissionTypes")]
public Type[] PermissionTypes { get; }
Property Value
Type | Description |
---|---|
System.Type[] | The types of the required permissions. |