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.
Go to the documentation of this file.
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>
8using System;
9using System.ComponentModel;
11namespace Csla.Rules
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; }
42 public object[] Criteria { get; internal set; }
48 {
49 }
57 public AuthorizationContext(IAuthorizationRule rule, object target, Type targetType)
58 {
59 Rule = rule;
60 Target = target;
61 TargetType = targetType;
62 }
63 }
Context information provided to an authorization rule when it is invoked.
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.