Browse Source

Merge branch 'dev' of https://github.com/abpframework/abp into dev

pull/20705/head
Ebicoglu 2 years ago
parent
commit
56a1292af5
  1. 6
      docs/en/studio/overview.md
  2. 16
      npm/ng-packs/packages/core/src/lib/utils/generator-utils.ts

6
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

16
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<string> = configState.getSettings('Identity.Password');
return Number(passwordRules['Abp.Identity.Password.RequiredLength']) || 8;
}

Loading…
Cancel
Save