Class RequiredRolesAttribute

Specifies the roles required for the module method invocation.

Inheritance
Object
Attribute
RequiredRolesAttribute
Inherited Members
Attribute.Equals(Object)
Attribute.GetCustomAttribute(Assembly, Type)
Attribute.GetCustomAttribute(Assembly, Type, Boolean)
Attribute.GetCustomAttribute(MemberInfo, Type)
Attribute.GetCustomAttribute(MemberInfo, Type, Boolean)
Attribute.GetCustomAttribute(Module, Type)
Attribute.GetCustomAttribute(Module, Type, Boolean)
Attribute.GetCustomAttribute(ParameterInfo, Type)
Attribute.GetCustomAttribute(ParameterInfo, Type, Boolean)
Attribute.GetCustomAttributes(Assembly)
Attribute.GetCustomAttributes(Assembly, Boolean)
Attribute.GetCustomAttributes(Assembly, Type)
Attribute.GetCustomAttributes(Assembly, Type, Boolean)
Attribute.GetCustomAttributes(MemberInfo)
Attribute.GetCustomAttributes(MemberInfo, Boolean)
Attribute.GetCustomAttributes(MemberInfo, Type)
Attribute.GetCustomAttributes(MemberInfo, Type, Boolean)
Attribute.GetCustomAttributes(Module)
Attribute.GetCustomAttributes(Module, Boolean)
Attribute.GetCustomAttributes(Module, Type)
Attribute.GetCustomAttributes(Module, Type, Boolean)
Attribute.GetCustomAttributes(ParameterInfo)
Attribute.GetCustomAttributes(ParameterInfo, Boolean)
Attribute.GetCustomAttributes(ParameterInfo, Type)
Attribute.GetCustomAttributes(ParameterInfo, Type, Boolean)
Attribute.GetHashCode()
Attribute.IsDefaultAttribute()
Attribute.IsDefined(Assembly, Type)
Attribute.IsDefined(Assembly, Type, Boolean)
Attribute.IsDefined(MemberInfo, Type)
Attribute.IsDefined(MemberInfo, Type, Boolean)
Attribute.IsDefined(Module, Type)
Attribute.IsDefined(Module, Type, Boolean)
Attribute.IsDefined(ParameterInfo, Type)
Attribute.IsDefined(ParameterInfo, Type, Boolean)
Attribute.Match(Object)
Attribute.TypeId
Object.Equals(Object, Object)
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: Solti.Utils.Rpc.Interfaces
Assembly: Solti.Utils.Rpc.Interfaces.dll
Syntax
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
public sealed class RequiredRolesAttribute : Attribute
Remarks

The module should be annotated with the RoleValidatorAspectAttribute.

Constructors

RequiredRolesAttribute(Object)

Creates a new RequiredRolesAttribute instance. You may specify more groups:
[MyRoles.Admin)]

Declaration
public RequiredRolesAttribute(object roleGroup)
Parameters
Type Name Description
Object roleGroup

RequiredRolesAttribute(Object[])

Creates a new RequiredRolesAttribute instance. You may specify more groups:
[RequiredRoles(MyRoles.StandardUser | MyRoles.CanPrint, MyRoles.Admin)]

Declaration
public RequiredRolesAttribute(params object[] roleGroups)
Parameters
Type Name Description
Object[] roleGroups

Properties

RoleGroups

The list of role groups required for module method invocation, e.g.:
[0] MyRoles.StandardUser | MyRoles.CanPrint
[1] MyRoles.Admin // admins are allowed to print by default

Declaration
public IReadOnlyList<Enum> RoleGroups { get; }
Property Value
Type Description
IReadOnlyList<Enum>
Remarks

If no roles specified, anonymous access is allowed.

In This Article
Back to top Generated by DocFX