Skip to content

Commit

Permalink
Allow interceptors to be added multiple times per metho
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaliumhexacyanoferrat committed Dec 8, 2024
1 parent 84db02f commit 998c446
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Modules/Authentication/RequireRoleAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace GenHTTP.Modules.Authentication;
/// if the authenticated user has the specified roles.
/// </summary>
/// <param name="roles">The roles which need to be present in order to let the request pass</param>
[AttributeUsage(AttributeTargets.Method)]
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
public class RequireRoleAttribute(params string[] roles) : InterceptWithAttribute<RoleInterceptor>
{

Expand Down
2 changes: 1 addition & 1 deletion Modules/Reflection/InterceptWithAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/// <remarks>
/// Allows to implement concerns on operation level such as authorization.
/// </remarks>
[AttributeUsage(AttributeTargets.Method)]
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
public class InterceptWithAttribute<T> : Attribute where T : IOperationInterceptor, new()
{

Expand Down

0 comments on commit 998c446

Please sign in to comment.