Fixes testing custom invite user flow and the AllowManualLinking setting for external providers
This commit is contained in:
@@ -40,7 +40,7 @@ function externalLoginInfoService(externalLoginInfo, umbRequestHelper) {
|
||||
*/
|
||||
function getLoginProviders(excludeUnlinkable) {
|
||||
if (excludeUnlinkable) {
|
||||
return _.filter(externalLoginInfo.providers, x => !x.properties.UmbracoBackOfficeExternalLoginOptions.AutoLinkOptions.AllowManualLinking);
|
||||
return _.filter(externalLoginInfo.providers, x => x.properties.ExternalSignInAutoLinkOptions.AllowManualLinking);
|
||||
}
|
||||
else {
|
||||
return externalLoginInfo.providers;
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
|
||||
<div ng-repeat="login in externalLoginProviders">
|
||||
|
||||
<div ng-if="!login.properties.UmbracoBackOfficeExternalLoginOptions.DenyLocalLogin">
|
||||
<div ng-if="login.properties.ExternalSignInAutoLinkOptions.AllowManualLinking">
|
||||
<form ng-submit="linkProvider($event)" ng-if="login.linkedProviderKey == undefined" method="POST" action="{{externalLinkLoginFormAction}}" name="oauthloginform" id="oauthloginform-{{login.authType}}">
|
||||
<input type="hidden" name="provider" value="{{login.authType}}" />
|
||||
<button class="btn btn-block btn-social"
|
||||
|
||||
@@ -88,6 +88,7 @@
|
||||
// Don't show the invite button if no email is configured
|
||||
if (Umbraco.Sys.ServerVariables.umbracoSettings.showUserInvite) {
|
||||
vm.defaultButton = {
|
||||
type: "button",
|
||||
labelKey: "user_inviteUser",
|
||||
handler: function () {
|
||||
vm.setUsersViewState('inviteUser');
|
||||
|
||||
@@ -517,7 +517,7 @@
|
||||
size="m">
|
||||
</umb-button>
|
||||
<umb-button
|
||||
ng-if-="vm.newUser.id"
|
||||
ng-if="vm.newUser.id"
|
||||
type="button"
|
||||
button-style="action"
|
||||
label-key="user_goToProfile"
|
||||
|
||||
@@ -22,9 +22,9 @@ namespace Umbraco.Web.Editors.Filters
|
||||
if (objectContent != null)
|
||||
{
|
||||
var model = objectContent.Value as UserBasic;
|
||||
if (model != null)
|
||||
if (model != null && model.Id is int userId)
|
||||
{
|
||||
model.IsCurrentUser = (int) model.Id == user.Id;
|
||||
model.IsCurrentUser = userId == user.Id;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -33,7 +33,10 @@ namespace Umbraco.Web.Editors.Filters
|
||||
{
|
||||
foreach (var userBasic in collection)
|
||||
{
|
||||
userBasic.IsCurrentUser = (int) userBasic.Id == user.Id;
|
||||
if (userBasic.Id is int uid)
|
||||
{
|
||||
userBasic.IsCurrentUser = uid == user.Id;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -43,7 +46,10 @@ namespace Umbraco.Web.Editors.Filters
|
||||
{
|
||||
foreach (var userBasic in paged.Items)
|
||||
{
|
||||
userBasic.IsCurrentUser = (int)userBasic.Id == user.Id;
|
||||
if (userBasic.Id is int uid)
|
||||
{
|
||||
userBasic.IsCurrentUser = uid == user.Id;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user