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.
Csla.Blazor/HasPermissionAttribute.cs
Go to the documentation of this file.
1//-----------------------------------------------------------------------
2// <copyright file="HasPermissionAttribute.cs" company="Marimer LLC">
3// Copyright (c) Marimer LLC. All rights reserved.
4// Website: https://cslanet.com
5// </copyright>
6// <summary>Authorizes user if they have permission</summary>
7//-----------------------------------------------------------------------
8using System;
9using Microsoft.AspNetCore.Authorization;
10
11namespace Csla.Blazor
12{
16 public class HasPermissionAttribute : AuthorizeAttribute
17 {
23 public HasPermissionAttribute(Rules.AuthorizationActions action, Type objectType)
24 : base(CslaPolicy.GetPolicy(action, objectType))
25 { }
26 }
27}
Authorizes user if they have permission.
HasPermissionAttribute(Rules.AuthorizationActions action, Type objectType)
Creates instance of type