-
Notifications
You must be signed in to change notification settings - Fork 2.1k
ViewComponent => User as ClaimsPrincipal #4964
Comments
The only reason I can think of is that |
This is how I overcome the difficulty right now.
Would anything break if you guys change |
This would be a binary breaking change |
😨 oops! Now I feel like an |
Mark this as a TODO for 2.0 and yes, make the breaking change #semver. |
This was always going to be a breaking change. It's been like this since at least RC1 (I know! I should've reported this earlier.. ). I think 2.0 is too far off so why not mark this as todo for like 1.1 or something? |
Assuming the right data all exists, let's add a new property to ViewComponent that returns the right data: ViewComponent {
public ClaimsPrincipal UserClaimsPrincipal { get; }
} It's kind of lame to have two properties that return the same instance, but this is a good and easy solution. |
Consider marking User property as obsolete? This way people can switch over to the new ClaimsPrincipal user property gracefully, and then the older property can be removed from a future release? |
@dazinator we generally don't mark things as obsolete unless we really think they shouldn't be used, but in this case I think it's fine, no? |
HomeController inherit ControllerBase gives
User
withClaimsPrincipal
DemoViewComponent inherit ViewComponent give
User
withIPrincipal
Is there any reason for such implementation?
The text was updated successfully, but these errors were encountered: