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
parent
commit
1f319feae4
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 16
      modules/account/src/Volo.Abp.Account.Web/Pages/Account/LoggedOut.cshtml.cs
  2. 6
      npm/ng-packs/packages/feature-management/src/lib/components/feature-management-tab/feature-management-tab.component.html
  3. 4
      npm/ng-packs/packages/feature-management/src/lib/components/feature-management-tab/feature-management-tab.component.ts
  4. 10
      npm/ng-packs/packages/feature-management/src/lib/components/feature-management/feature-management.component.ts
  5. 15
      npm/ng-packs/packages/identity/src/lib/defaults/default-users-form-props.ts

16
modules/account/src/Volo.Abp.Account.Web/Pages/Account/LoggedOut.cshtml.cs

@ -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));
}
}
}

6
npm/ng-packs/packages/feature-management/src/lib/components/feature-management-tab/feature-management-tab.component.html

@ -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>

4
npm/ng-packs/packages/feature-management/src/lib/components/feature-management-tab/feature-management-tab.component.ts

@ -9,9 +9,7 @@ export class FeatureManagementTabComponent {
providerKey: string;
openFeaturesModal() {
setTimeout(() => {
this.visibleFeatures = true;
}, 0);
this.visibleFeatures = true;
}
onVisibleFeaturesChange = (value: boolean) => {

10
npm/ng-packs/packages/feature-management/src/lib/components/feature-management/feature-management.component.ts

@ -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>();

15
npm/ng-packs/packages/identity/src/lib/defaults/default-users-form-props.ts

@ -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;
});

Loading…
Cancel
Save