Browse Source
Merge pull request #17600 from abpframework/auto-merge/rel-7-4/2176
Merge branch dev with rel-7.4
pull/17602/head
maliming
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with
42 additions and
9 deletions
-
modules/account/src/Volo.Abp.Account.Web/Pages/Account/LoggedOut.cshtml.cs
-
npm/ng-packs/packages/feature-management/src/lib/components/feature-management-tab/feature-management-tab.component.html
-
npm/ng-packs/packages/feature-management/src/lib/components/feature-management-tab/feature-management-tab.component.ts
-
npm/ng-packs/packages/feature-management/src/lib/components/feature-management/feature-management.component.ts
-
npm/ng-packs/packages/identity/src/lib/defaults/default-users-form-props.ts
|
|
|
@ -1,5 +1,6 @@ |
|
|
|
using System.Threading.Tasks; |
|
|
|
using Microsoft.AspNetCore.Mvc; |
|
|
|
using NUglify.Helpers; |
|
|
|
|
|
|
|
namespace Volo.Abp.Account.Web.Pages.Account; |
|
|
|
|
|
|
|
@ -19,11 +20,26 @@ public class LoggedOutModel : AccountPageModel |
|
|
|
|
|
|
|
public virtual Task<IActionResult> OnGetAsync() |
|
|
|
{ |
|
|
|
NormalizeUrl(); |
|
|
|
return Task.FromResult<IActionResult>(Page()); |
|
|
|
} |
|
|
|
|
|
|
|
public virtual Task<IActionResult> OnPostAsync() |
|
|
|
{ |
|
|
|
NormalizeUrl(); |
|
|
|
return Task.FromResult<IActionResult>(Page()); |
|
|
|
} |
|
|
|
|
|
|
|
protected virtual void NormalizeUrl() |
|
|
|
{ |
|
|
|
if (!PostLogoutRedirectUri.IsNullOrWhiteSpace()) |
|
|
|
{ |
|
|
|
PostLogoutRedirectUri = Url.Content(GetRedirectUrl(PostLogoutRedirectUri)); |
|
|
|
} |
|
|
|
|
|
|
|
if(!SignOutIframeUrl.IsNullOrWhiteSpace()) |
|
|
|
{ |
|
|
|
SignOutIframeUrl = Url.Content(GetRedirectUrl(SignOutIframeUrl)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -4,7 +4,8 @@ |
|
|
|
<i class="fa fa-cog" aria-hidden="true"></i> |
|
|
|
{{ 'AbpFeatureManagement::ManageHostFeatures' | abpLocalization }} |
|
|
|
</button> |
|
|
|
<abp-feature-management |
|
|
|
<ng-container *ngIf="visibleFeatures"> |
|
|
|
<abp-feature-management |
|
|
|
*abpReplaceableTemplate="{ |
|
|
|
inputs: { |
|
|
|
providerName: { value: 'T' }, |
|
|
|
@ -17,5 +18,6 @@ |
|
|
|
[(visible)]="visibleFeatures" |
|
|
|
providerName="T" |
|
|
|
[providerKey]="providerKey" |
|
|
|
> |
|
|
|
> |
|
|
|
</abp-feature-management> |
|
|
|
</ng-container> |
|
|
|
|
|
|
|
@ -9,9 +9,7 @@ export class FeatureManagementTabComponent { |
|
|
|
providerKey: string; |
|
|
|
|
|
|
|
openFeaturesModal() { |
|
|
|
setTimeout(() => { |
|
|
|
this.visibleFeatures = true; |
|
|
|
}, 0); |
|
|
|
this.visibleFeatures = true; |
|
|
|
} |
|
|
|
|
|
|
|
onVisibleFeaturesChange = (value: boolean) => { |
|
|
|
|
|
|
|
@ -55,11 +55,17 @@ export class FeatureManagementComponent |
|
|
|
} |
|
|
|
|
|
|
|
set visible(value: boolean) { |
|
|
|
if (this._visible === value) return; |
|
|
|
if (this._visible === value) { |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
this._visible = value; |
|
|
|
this.visibleChange.emit(value); |
|
|
|
if (value) this.openModal(); |
|
|
|
|
|
|
|
if (value) { |
|
|
|
this.openModal(); |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@Output() readonly visibleChange = new EventEmitter<boolean>(); |
|
|
|
|
|
|
|
@ -1,7 +1,8 @@ |
|
|
|
import { IdentityUserDto } from '@abp/ng.identity/proxy'; |
|
|
|
import { Validators } from '@angular/forms'; |
|
|
|
import { ConfigStateService, CurrentUserDto } from '@abp/ng.core'; |
|
|
|
import { getPasswordValidators } from '@abp/ng.theme.shared'; |
|
|
|
import { ePropType, FormProp } from '@abp/ng.theme.shared/extensions'; |
|
|
|
import { Validators } from '@angular/forms'; |
|
|
|
import { IdentityUserDto } from '@abp/ng.identity/proxy'; |
|
|
|
|
|
|
|
export const DEFAULT_USERS_CREATE_FORM_PROPS = FormProp.createMany<IdentityUserDto>([ |
|
|
|
{ |
|
|
|
@ -70,5 +71,15 @@ export const DEFAULT_USERS_EDIT_FORM_PROPS = DEFAULT_USERS_CREATE_FORM_PROPS.map |
|
|
|
validators: (data: any) => [...getPasswordValidators({ get: data.getInjected })], |
|
|
|
}; |
|
|
|
} |
|
|
|
if (prop.name === 'isActive') { |
|
|
|
return { |
|
|
|
...prop, |
|
|
|
visible: data => { |
|
|
|
const configState = data.getInjected(ConfigStateService); |
|
|
|
const currentUserId = configState.getDeep('currentUser.id'); |
|
|
|
return currentUserId !== data.record.id; |
|
|
|
}, |
|
|
|
}; |
|
|
|
} |
|
|
|
return prop; |
|
|
|
}); |
|
|
|
|