diff --git a/docs/en/studio/overview.md b/docs/en/studio/overview.md index c60e80a256..ecfdda52bc 100644 --- a/docs/en/studio/overview.md +++ b/docs/en/studio/overview.md @@ -40,8 +40,9 @@ The top menu is the main menu bar in ABP Studio. It offers access to various fun ### Tools Menu - **Options** - - **Theme:** Allows to change UI theme. -- **Extensions:** Opens the extension management window. + - **Theme:** Allows to change UI theme. +- **Global secrets**: Allows to add global secrets. +- **Global metadata**: Allows to add global metadata. ### Help Menu @@ -50,6 +51,7 @@ The top menu is the main menu bar in ABP Studio. It offers access to various fun - **Community:** Opens the official [ABP Community](https://abp.io/community) website in your browser. - **Support:** Opens the official [Support](https://abp.io/support/questions) website in your browser. - **My Support Questions:** Opens the page on the official Support website in your browser showing the tickets you have opened. +- **Check for updates:** Checks for new version of ABP Studio. - **About:** Opens the about window of ABP Studio where you can get more information about it. ## Welcome Screen diff --git a/npm/ng-packs/packages/core/src/lib/utils/generator-utils.ts b/npm/ng-packs/packages/core/src/lib/utils/generator-utils.ts index ed58ba97ef..5c75da0db0 100644 --- a/npm/ng-packs/packages/core/src/lib/utils/generator-utils.ts +++ b/npm/ng-packs/packages/core/src/lib/utils/generator-utils.ts @@ -1,3 +1,7 @@ +import { Injector } from '@angular/core'; +import { ABP } from '../models'; +import { ConfigStateService } from '../services'; + export function uuid(a?: any): string { return a ? (a ^ ((Math.random() * 16) >> (a / 4))).toString(16) @@ -16,7 +20,11 @@ export function generateHash(value: string): number { return hashed; } -export function generatePassword(length = 8) { +export function generatePassword(injector?: Injector, length = 8) { + if (injector) { + length = getRequiredPasswordLength(injector); + } + length = Math.min(Math.max(4, length), 128); const lowers = 'abcdefghjkmnpqrstuvwxyz'; @@ -39,3 +47,9 @@ export function generatePassword(length = 8) { return password.sort(() => 0.5 - Math.random()).join(''); } + +function getRequiredPasswordLength(injector: Injector) { + const configState = injector.get(ConfigStateService); + const passwordRules: ABP.Dictionary = configState.getSettings('Identity.Password'); + return Number(passwordRules['Abp.Identity.Password.RequiredLength']) || 8; +}