CSLA.NET 5.4.2
CSLA .NET is a software development framework that helps you build a reusable, maintainable object-oriented business layer for your app.
AuthorizationContext.cs
Go to the documentation of this file.
1//-----------------------------------------------------------------------
2// <copyright file="AuthorizationContext.cs" company="Marimer LLC">
3// Copyright (c) Marimer LLC. All rights reserved.
4// Website: https://cslanet.com
5// </copyright>
6// <summary>Context information provided to an authorization</summary>
7//-----------------------------------------------------------------------
8using System;
9using System.ComponentModel;
10
11namespace Csla.Rules
12{
18 {
22 [EditorBrowsable(EditorBrowsableState.Never)]
23 public IAuthorizationRule Rule { get; internal set; }
27 public object Target { get; internal set; }
31 public Type TargetType { get; internal set; }
37 public bool HasPermission { get; set; }
38
42 public object[] Criteria { get; internal set; }
43
48 {
49 }
50
57 public AuthorizationContext(IAuthorizationRule rule, object target, Type targetType)
58 {
59 Rule = rule;
60 Target = target;
61 TargetType = targetType;
62 }
63 }
64}
Context information provided to an authorization rule when it is invoked.
AuthorizationContext()
Initializes a new instance of the AuthorizationContext class.
Type TargetType
Gets the type of the target business class.
bool HasPermission
Gets or sets a value indicating whether the current user has permission to perform the requested acti...
object[] Criteria
Gets an object which is the criteria specified in the data portal call, if any.
IAuthorizationRule Rule
Gets the rule object.
AuthorizationContext(IAuthorizationRule rule, object target, Type targetType)
Creates a AuthorizationContext instance for unit testing.
object Target
Gets a reference to the target business object.
Implemented by objects which provide context information to an authorization rule when it is invoked.
Interface defining an authorization rule implementation.