Skip to content

Commit

Permalink
Add AuthorizeRetrieveAttribute that may be used for endpoint Retrieve…
Browse files Browse the repository at this point in the history
… methods
  • Loading branch information
volkanceylan committed Jan 3, 2025
1 parent bf3ea8c commit 1f7fcfa
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/Serenity.Net.Web/Mvc/AuthorizeRetrieveAttribute.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
namespace Serenity.Services;

/// <summary>
/// Authorizes retrieve access to a service method by reading <see cref="ReadPermissionAttribute"/>.
/// <see cref="ServiceLookupPermissionAttribute"/>
/// </summary>
/// <remarks>
/// Creates a new instance of the attribute
/// </remarks>
/// <param name="sourceType">Source type</param>
public class AuthorizeRetrieveAttribute(Type sourceType)
: ServiceAuthorizeAttribute(sourceType, typeof(ReadPermissionAttribute))
{
}

0 comments on commit 1f7fcfa

Please sign in to comment.