You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However this prevents the possibility of using the generic GetById and List queries that are already available in OneBeyond Studio Core and limit the reusability of the dedicated generic handlers.
A possible implementation could be a sort of fluent configuration where a user can specify that for a MediatR IRequest there is an authorisation requirement applied (a bit like Automapper):
At the moment the only way to protect a Command or Query with an AuthorizationRequirement is applying an Attribute to the class representing that Command Or Query:
https://github.com/onebeyond/onebeyond-studio-core/blob/main/src/OneBeyond.Studio.Domain.SharedKernel/Authorization/AuthorizationPolicyAttribute.cs
However this prevents the possibility of using the generic GetById and List queries that are already available in OneBeyond Studio Core and limit the reusability of the dedicated generic handlers.
A possible implementation could be a sort of fluent configuration where a user can specify that for a MediatR IRequest there is an authorisation requirement applied (a bit like Automapper):
For(typeof(GetById<SomeEntityDto, SomeEntity, Guid>)).ApplyRequirement(typeof(MyPermissionRequirement));
The text was updated successfully, but these errors were encountered: