Merge remote-tracking branch 'refs/remotes/origin/v14/dev' into v15/merge
# Conflicts: # Directory.Packages.props # tests/Directory.Packages.props # version.json
This commit is contained in:
@@ -34,8 +34,6 @@ public static class ClaimsIdentityExtensions
|
||||
ClaimTypes.Name, // username
|
||||
ClaimTypes.GivenName,
|
||||
|
||||
// Constants.Security.StartContentNodeIdClaimType, These seem to be able to be null...
|
||||
// Constants.Security.StartMediaNodeIdClaimType,
|
||||
ClaimTypes.Locality, Constants.Security.SecurityStampClaimType,
|
||||
};
|
||||
|
||||
@@ -250,6 +248,7 @@ public static class ClaimsIdentityExtensions
|
||||
identity));
|
||||
}
|
||||
|
||||
// NOTE: this can be removed when the obsolete claim type has been deleted
|
||||
if (identity.HasClaim(x => x.Type == Constants.Security.StartContentNodeIdClaimType) == false &&
|
||||
startContentNodes != null)
|
||||
{
|
||||
@@ -265,6 +264,7 @@ public static class ClaimsIdentityExtensions
|
||||
}
|
||||
}
|
||||
|
||||
// NOTE: this can be removed when the obsolete claim type has been deleted
|
||||
if (identity.HasClaim(x => x.Type == Constants.Security.StartMediaNodeIdClaimType) == false &&
|
||||
startMediaNodes != null)
|
||||
{
|
||||
@@ -304,6 +304,7 @@ public static class ClaimsIdentityExtensions
|
||||
}
|
||||
|
||||
// Add each app as a separate claim
|
||||
// NOTE: this can be removed when the obsolete claim type has been deleted
|
||||
if (identity.HasClaim(x => x.Type == Constants.Security.AllowedApplicationsClaimType) == false && allowedApps != null)
|
||||
{
|
||||
foreach (var application in allowedApps)
|
||||
@@ -343,6 +344,7 @@ public static class ClaimsIdentityExtensions
|
||||
/// </summary>
|
||||
/// <param name="identity"></param>
|
||||
/// <returns>Array of start content nodes</returns>
|
||||
[Obsolete("Please use the UserExtensions class to access user start node info. Will be removed in V15.")]
|
||||
public static int[] GetStartContentNodes(this ClaimsIdentity identity) =>
|
||||
identity.FindAll(x => x.Type == Constants.Security.StartContentNodeIdClaimType)
|
||||
.Select(node => int.TryParse(node.Value, NumberStyles.Integer, CultureInfo.InvariantCulture, out var i)
|
||||
@@ -355,6 +357,7 @@ public static class ClaimsIdentityExtensions
|
||||
/// </summary>
|
||||
/// <param name="identity"></param>
|
||||
/// <returns>Array of start media nodes</returns>
|
||||
[Obsolete("Please use the UserExtensions class to access user start node info. Will be removed in V15.")]
|
||||
public static int[] GetStartMediaNodes(this ClaimsIdentity identity) =>
|
||||
identity.FindAll(x => x.Type == Constants.Security.StartMediaNodeIdClaimType)
|
||||
.Select(node => int.TryParse(node.Value, NumberStyles.Integer, CultureInfo.InvariantCulture, out var i)
|
||||
@@ -367,6 +370,7 @@ public static class ClaimsIdentityExtensions
|
||||
/// </summary>
|
||||
/// <param name="identity"></param>
|
||||
/// <returns></returns>
|
||||
[Obsolete("Please use IUser.AllowedSections instead. Will be removed in V15.")]
|
||||
public static string[] GetAllowedApplications(this ClaimsIdentity identity) => identity
|
||||
.FindAll(x => x.Type == Constants.Security.AllowedApplicationsClaimType).Select(app => app.Value).ToArray();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user