IntelliTect / Coalesce

Quickly build amazing web apps
https://intellitect.github.io/Coalesce/
Apache License 2.0
64 stars 22 forks source link

Remove IntelliTect.Coalesce.DataAnnotations.RoleMapping #97

Closed ascott18 closed 5 years ago

ascott18 commented 6 years ago

The same functionality that this class aims to accomplish can be accomplished just the same by simple adding additional roles to the current ClaimsPrincipal (potentially by attaching these additional roles in an additional ClaimsIdentity that gets added to the ClaimsPrincipal) associated with the current request.

This can be done manually, or via an IClaimsTransformation a la https://github.com/aspnet/AuthSamples/tree/6882459a248c10e414e5d1744a9b0845f5727868/samples/ClaimsTransformation (another example at https://brockallen.com/2017/08/30/beware-in-asp-net-core-2-0-claims-transformation-might-run-multiple-times/ )

ascott18 commented 6 years ago

cc @GrantErickson

GrantErickson commented 6 years ago

Agreed, that this can be handled in other ways now. There were limitations in the early versions of .NET Core.