IdeaBlade DevForce 2010 Help Reference
RequiresRolesAttribute Class
Members  See Also  Send Feedback
IdeaBlade.Core Assembly > IdeaBlade.Core.DomainServices Namespace : RequiresRolesAttribute Class



Attribute used to decorate a method or class to indicate that the current user must be in all of the indicated roles.

Syntax

Visual Basic (Declaration) 
<AttributeUsageAttribute(ValidOn=AttributeTargets.Class Or  _
    AttributeTargets.Method, 
   AllowMultiple=False, 
   Inherited=True)>
Public NotInheritable Class RequiresRolesAttribute 
   Inherits AuthorizationAttribute
   Implements System.Runtime.InteropServices._Attribute 
Visual Basic (Usage)Copy Code
Dim instance As RequiresRolesAttribute
C# 
[AttributeUsageAttribute(ValidOn=AttributeTargets.Class | 
    AttributeTargets.Method, 
   AllowMultiple=false, 
   Inherited=true)]
public sealed class RequiresRolesAttribute : AuthorizationAttribute, System.Runtime.InteropServices._Attribute  
C++/CLI 
[AttributeUsageAttribute(ValidOn=AttributeTargets.Class | 
    AttributeTargets.Method, 
   AllowMultiple=false, 
   Inherited=true)]
public ref class RequiresRolesAttribute sealed : public AuthorizationAttribute, System.Runtime.InteropServices._Attribute  

Remarks

When the RequiresRoles attribute is applied to your entities the appropriate query or save interceptor will check the attribute during authorization.

The attribute can also be applied to methods., such as remote service methods, named query methods, and all POCO methods.

If the user does not pass the authorization check, a PersistenceSecurityException is received on the client.

Inheritance Hierarchy

System.Object
   System.Attribute
      IdeaBlade.Core.DomainServices.AuthorizationAttribute
         IdeaBlade.Core.DomainServices.RequiresRolesAttribute

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2013 All Rights Reserved.