passbolt-styleguide 5.4.2 → 5.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/css/help.min.css +1 -1
- package/build/css/public.min.css +1 -1
- package/build/css/themes/default/api_authentication.min.css +1 -1
- package/build/css/themes/default/api_cloud.min.css +1 -1
- package/build/css/themes/default/api_main.min.css +1 -1
- package/build/css/themes/default/api_reports.min.css +1 -1
- package/build/css/themes/default/api_webinstaller.min.css +1 -1
- package/build/css/themes/default/ext_app.min.css +1 -1
- package/build/css/themes/default/ext_authentication.min.css +1 -1
- package/build/css/themes/default/ext_external.min.css +1 -1
- package/build/css/themes/default/ext_in_form_cta.min.css +1 -1
- package/build/css/themes/default/ext_in_form_menu.min.css +1 -1
- package/build/css/themes/default/ext_quickaccess.min.css +1 -1
- package/build/css/themes/midgar/api_authentication.min.css +1 -1
- package/build/css/themes/midgar/api_main.min.css +1 -1
- package/build/css/themes/midgar/api_reports.min.css +1 -1
- package/build/css/themes/midgar/ext_app.min.css +1 -1
- package/build/css/themes/midgar/ext_authentication.min.css +1 -1
- package/build/css/themes/midgar/ext_in_form_cta.min.css +1 -1
- package/build/css/themes/midgar/ext_in_form_menu.min.css +1 -1
- package/build/css/themes/midgar/ext_quickaccess.min.css +1 -1
- package/package.json +1 -1
- package/src/react-web-integration/components/DisplayInFormMenu/DisplayInFormMenu.js +1 -1
- package/src/react-web-integration/components/DisplayInFormMenu/DisplayInFormMenu.test.js +19 -1
package/build/css/help.min.css
CHANGED
package/build/css/public.min.css
CHANGED
package/package.json
CHANGED
|
@@ -389,7 +389,7 @@ class DisplayInFormMenu extends React.Component {
|
|
|
389
389
|
if (this.props.metadataTypeSettings.isDefaultResourceTypeV5) {
|
|
390
390
|
const isMetadataSharedKeyEnforced = !this.props.metadataKeysSettings?.allowUsageOfPersonalKeys;
|
|
391
391
|
const userHasMissingKeys = this.props.context.loggedInUser?.missing_metadata_key_ids?.length > 0;
|
|
392
|
-
return !isMetadataSharedKeyEnforced &&
|
|
392
|
+
return !(isMetadataSharedKeyEnforced && userHasMissingKeys) && this.props.resourceTypes?.hasOneWithSlug(RESOURCE_TYPE_V5_DEFAULT_SLUG);
|
|
393
393
|
} else if (this.props.metadataTypeSettings.isDefaultResourceTypeV4) {
|
|
394
394
|
return this.props.resourceTypes?.hasOneWithSlug(RESOURCE_TYPE_PASSWORD_AND_DESCRIPTION_SLUG);
|
|
395
395
|
} else {
|
|
@@ -30,6 +30,10 @@ import ResourceTypesCollection from "../../../shared/models/entity/resourceType/
|
|
|
30
30
|
import {
|
|
31
31
|
resourceTypesV4CollectionDto, resourceTypesV5CollectionDto
|
|
32
32
|
} from "../../../shared/models/entity/resourceType/resourceTypesCollection.test.data";
|
|
33
|
+
import MetadataKeysSettingsEntity from "../../../shared/models/entity/metadata/metadataKeysSettingsEntity";
|
|
34
|
+
import {
|
|
35
|
+
defaultMetadataKeysSettingsDto
|
|
36
|
+
} from "../../../shared/models/entity/metadata/metadataKeysSettingsEntity.test.data";
|
|
33
37
|
|
|
34
38
|
beforeEach(() => {
|
|
35
39
|
jest.resetModules();
|
|
@@ -94,6 +98,20 @@ describe("See the Inform Menu", () => {
|
|
|
94
98
|
expect(page.informMenuItems.length).toBe(4);
|
|
95
99
|
});
|
|
96
100
|
|
|
101
|
+
it('I should see create credentials menu items if I am missing the shared metadata key but it is not enforced', async() => {
|
|
102
|
+
expect.assertions(1);
|
|
103
|
+
const props = defaultPropsWithMissingMetadataKey({metadataKeysSettings: new MetadataKeysSettingsEntity(defaultMetadataKeysSettingsDto())});
|
|
104
|
+
const resources = [defaultResourceDto(), defaultResourceDto()];
|
|
105
|
+
const configuration = {inputType: "username", inputValue: "", suggestedResources: resources};
|
|
106
|
+
jest.spyOn(props.context.port, "request").mockImplementationOnce(() => configuration);
|
|
107
|
+
jest.spyOn(props.context.port, "request").mockImplementationOnce(() => defaultPasswordPoliciesDto());
|
|
108
|
+
|
|
109
|
+
const page = new DisplayInFormMenuTestPage(props);
|
|
110
|
+
await waitFor(() => {});
|
|
111
|
+
|
|
112
|
+
expect(page.informMenuItems.length).toBe(4);
|
|
113
|
+
});
|
|
114
|
+
|
|
97
115
|
it('I should not see create credentials menu items if metadata type setting is not loaded', async() => {
|
|
98
116
|
expect.assertions(1);
|
|
99
117
|
const props = defaultProps({metadataTypeSettings: null});
|
|
@@ -108,7 +126,7 @@ describe("See the Inform Menu", () => {
|
|
|
108
126
|
expect(page.informMenuItems.length).toBe(3);
|
|
109
127
|
});
|
|
110
128
|
|
|
111
|
-
it('I should not see create credentials menu items if I am missing the shared metadata key', async() => {
|
|
129
|
+
it('I should not see create credentials menu items if I am missing the shared metadata key and it is enforced', async() => {
|
|
112
130
|
expect.assertions(1);
|
|
113
131
|
const props = defaultPropsWithMissingMetadataKey();
|
|
114
132
|
const resources = [defaultResourceDto(), defaultResourceDto()];
|