Skip to content

Commit

Permalink
[F] Add verify utility on user
Browse files Browse the repository at this point in the history
  • Loading branch information
1aurend authored and zdavis committed Feb 23, 2024
1 parent 67923c6 commit 44ada2a
Show file tree
Hide file tree
Showing 12 changed files with 50 additions and 13 deletions.
5 changes: 3 additions & 2 deletions client/src/backend/components/layout/DrawerHeader/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default class DrawerEntityHeader extends PureComponent {
children: PropTypes.any,
buttons: PropTypes.array,
icon: PropTypes.string,
buttonLayout: PropTypes.oneOf(["stack", "inline"]),
buttonLayout: PropTypes.oneOf(["stack", "inline", "grid"]),
small: PropTypes.bool,
instructionsAreWarning: PropTypes.bool
};
Expand All @@ -29,7 +29,7 @@ export default class DrawerEntityHeader extends PureComponent {
}

get inlineButtons() {
return this.props.buttonLayout !== "stack";
return !this.props.buttonLayout || this.props.buttonLayout === "inline";
}

render() {
Expand Down Expand Up @@ -58,6 +58,7 @@ export default class DrawerEntityHeader extends PureComponent {
{this.props.children}
{this.props.buttons.length > 0 && (
<Styled.ButtonGroup
$grid={this.props.buttonLayout === "grid"}
className={classNames({
"utility-button-group": true,
"utility-button-group--stack": this.stackButtons,
Expand Down
4 changes: 4 additions & 0 deletions client/src/backend/components/layout/DrawerHeader/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,8 @@ export const Instructions = styled.span`

export const ButtonGroup = styled.div`
margin-top: 24px;
${({ $grid }) =>
$grid &&
`display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 12px;`}
`;
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`backend/containers/Records/export-targets/Edit matches the snapshot when rendered 1`] = `"<section><header class=\\"css-ibt74g-Header ewz6knw5\\"><h2 class=\\" css-4532mb-TitleWrapper ewz6knw4\\"><span class=\\"css-183oh9-Title ewz6knw2\\">test export target</span></h2><div class=\\"utility-button-group utility-button-group--inline css-hnxvlr-ButtonGroup ewz6knw0\\"><button class=\\"utility-button\\" type=\\"button\\"><svg xmlns=\\"http://www.w3.org/2000/svg\\" class=\\"manicon-svg utility-button__icon--notice utility-button__icon svg-icon--delete32\\" width=\\"24\\" height=\\"24\\" viewBox=\\"0 0 32 32\\" fill=\\"currentColor\\" aria-hidden=\\"true\\"><path d=\\"M22.5006476,10.9603607 L23.4993524,11.0112392 L22.8010808,24.6917831 C22.8222428,25.6607758 22.05432,26.4636781 21.074,26.4858 L10.9146542,26.4856713 C9.94567997,26.4636781 9.17775722,25.6607758 9.19944755,24.7281393 L8.50064755,11.0112392 L9.49935241,10.9603607 L10.1986808,24.713617 C10.1895701,25.1307915 10.5201792,25.4764602 10.926,25.4858 L21.0626542,25.4859288 C21.4798208,25.4764602 21.8104299,25.1307915 21.8018476,24.6772608 L22.5006476,10.9603607 Z M5.99999997,11.4266 L5.99999997,10.4266 L26,10.4266 L26,11.4266 L5.99999997,11.4266 Z M12.75,10.9266 L11.75,10.9266 L11.7501673,6.81953297 C11.732004,6.11756111 12.2857775,5.53349733 13.0014,5.51409997 L19.0122785,5.5142871 C19.7142225,5.53349733 20.267996,6.11756111 20.25,6.80659997 L20.25,10.9266 L19.25,10.9266 L19.2501673,6.79366698 C19.2540602,6.64321292 19.1353696,6.51803017 18.9986,6.51409997 L13.0150785,6.51391283 C12.8646304,6.51803017 12.7459398,6.64321292 12.75,6.80659997 L12.75,10.9266 Z M13.5,14.7217 L14.5,14.7217 L14.5,22.25 L13.5,22.25 L13.5,14.7217 Z M17.5,14.7217 L18.5,14.7217 L18.5,22.25 L17.5,22.25 L17.5,14.7217 Z\\"></path></svg><span class=\\"utility-button__text\\">actions.delete</span></button></div></header><form class=\\" css-45hpsz-Form ezbpect0\\" data-id=\\"submit\\"><div class=\\"wide css-1idpiku-Wrapper eon8abq0\\"><label for=\\"text-input-1\\" class=\\"css-6arrr7-PrimaryLabel-SecondaryLabel e11et4nf1\\">settings.export_targets.name_label</label><input id=\\"text-input-1\\" name=\\"attributes[name]\\" type=\\"text\\" placeholder=\\"settings.export_targets.name_placeholder\\" aria-describedby=\\"text-input-error-1 text-input-instructions-1\\" class=\\"css-4cq9a0-BaseInput-SecondaryInput e1e2hl9r4\\" value=\\"test export target\\"></div><div class=\\"wide css-1idpiku-Wrapper eon8abq0\\"><label for=\\"text-input-1\\" class=\\"css-6arrr7-PrimaryLabel-SecondaryLabel e11et4nf1\\">settings.export_targets.format_label</label><input id=\\"text-input-1\\" name=\\"attributes[configuration][targetNameFormat]\\" type=\\"text\\" placeholder=\\"%s.%e\\" aria-describedby=\\"text-input-error-1 text-input-instructions-1\\" class=\\"css-4cq9a0-BaseInput-SecondaryInput e1e2hl9r4\\" value=\\"%s-%t.%e\\"></div><div class=\\"css-1idpiku-Wrapper eon8abq0\\"><label for=\\"select-1\\" class=\\"css-6arrr7-PrimaryLabel-SecondaryLabel e11et4nf1\\">settings.export_targets.type_label</label><div class=\\"css-e6curp-SecondarySelectWrapper exv2xkc7\\"><svg xmlns=\\"http://www.w3.org/2000/svg\\" class=\\"manicon-svg css-nnaksz-Icon exv2xkc1 svg-icon--disclosureDown24\\" width=\\"24\\" height=\\"24\\" viewBox=\\"0 0 24 24\\" fill=\\"currentColor\\" aria-hidden=\\"true\\"><polygon points=\\"20.374 9 21 9.78 12 17 3 9.78 3.626 9 12 15.718\\"></polygon></svg><select id=\\"select-1\\" aria-describedby=\\"select-error-1 select-instructions-1\\" class=\\"css-zhm7ug-BaseSelect-SecondarySelect exv2xkc3\\"><option value=\\"sftp_key\\">settings.export_targets.type_options.sftp_key</option><option value=\\"sftp_password\\">settings.export_targets.type_options.sftp_password</option></select></div></div><div class=\\"wide css-1idpiku-Wrapper eon8abq0\\"><label for=\\"text-input-1\\" class=\\"css-6arrr7-PrimaryLabel-SecondaryLabel e11et4nf1\\">settings.export_targets.host_label</label><input id=\\"text-input-1\\" name=\\"attributes[configuration][sftpKey][host]\\" type=\\"text\\" placeholder=\\"settings.export_targets.host_placeholder\\" aria-describedby=\\"text-input-error-1 text-input-instructions-1\\" class=\\"css-4cq9a0-BaseInput-SecondaryInput e1e2hl9r4\\" value=\\"172.217.3.164\\"></div><div class=\\"wide css-1idpiku-Wrapper eon8abq0\\"><label for=\\"text-input-1\\" class=\\"css-6arrr7-PrimaryLabel-SecondaryLabel e11et4nf1\\">settings.export_targets.port_label</label><input id=\\"text-input-1\\" name=\\"attributes[configuration][sftpKey][port]\\" type=\\"text\\" placeholder=\\"22\\" aria-describedby=\\"text-input-error-1 text-input-instructions-1\\" class=\\"css-4cq9a0-BaseInput-SecondaryInput e1e2hl9r4\\" value=\\"2\\"></div><div class=\\"wide css-1idpiku-Wrapper eon8abq0\\"><label for=\\"text-input-1\\" class=\\"css-6arrr7-PrimaryLabel-SecondaryLabel e11et4nf1\\">settings.export_targets.username_label</label><input id=\\"text-input-1\\" name=\\"attributes[configuration][sftpKey][username]\\" type=\\"text\\" placeholder=\\"settings.export_targets.username_placeholder\\" aria-describedby=\\"text-input-error-1 text-input-instructions-1\\" class=\\"css-4cq9a0-BaseInput-SecondaryInput e1e2hl9r4\\" value=\\"rambo\\"></div><div class=\\"wide css-1idpiku-Wrapper eon8abq0\\"><label for=\\"textarea-1\\" class=\\"css-6arrr7-PrimaryLabel-SecondaryLabel e11et4nf1\\">settings.export_targets.private_key_label</label><textarea id=\\"textarea-1\\" name=\\"attributes[configuration][sftpKey][privateKey]\\" aria-describedby=\\"textarea-error-1 textarea-instructions-1\\" style=\\"height: 100px;\\" class=\\"css-fcy7ah-TextAreaBase-TextAreaSecondary epknsgy0\\">testprivatekey</textarea></div><div class=\\"wide ep2gwrw0 css-og67sx-Wrapper-FormButtonsWrapper eon8abq0\\"><input class=\\"button-secondary button-secondary--outlined\\" type=\\"submit\\" value=\\"settings.export_targets.submit_label\\"></div></form></section>"`;
exports[`backend/containers/Records/export-targets/Edit matches the snapshot when rendered 1`] = `"<section><header class=\\"css-ibt74g-Header ewz6knw5\\"><h2 class=\\" css-4532mb-TitleWrapper ewz6knw4\\"><span class=\\"css-183oh9-Title ewz6knw2\\">test export target</span></h2><div class=\\"utility-button-group utility-button-group--inline css-5f51mp-ButtonGroup ewz6knw0\\"><button class=\\"utility-button\\" type=\\"button\\"><svg xmlns=\\"http://www.w3.org/2000/svg\\" class=\\"manicon-svg utility-button__icon--notice utility-button__icon svg-icon--delete32\\" width=\\"24\\" height=\\"24\\" viewBox=\\"0 0 32 32\\" fill=\\"currentColor\\" aria-hidden=\\"true\\"><path d=\\"M22.5006476,10.9603607 L23.4993524,11.0112392 L22.8010808,24.6917831 C22.8222428,25.6607758 22.05432,26.4636781 21.074,26.4858 L10.9146542,26.4856713 C9.94567997,26.4636781 9.17775722,25.6607758 9.19944755,24.7281393 L8.50064755,11.0112392 L9.49935241,10.9603607 L10.1986808,24.713617 C10.1895701,25.1307915 10.5201792,25.4764602 10.926,25.4858 L21.0626542,25.4859288 C21.4798208,25.4764602 21.8104299,25.1307915 21.8018476,24.6772608 L22.5006476,10.9603607 Z M5.99999997,11.4266 L5.99999997,10.4266 L26,10.4266 L26,11.4266 L5.99999997,11.4266 Z M12.75,10.9266 L11.75,10.9266 L11.7501673,6.81953297 C11.732004,6.11756111 12.2857775,5.53349733 13.0014,5.51409997 L19.0122785,5.5142871 C19.7142225,5.53349733 20.267996,6.11756111 20.25,6.80659997 L20.25,10.9266 L19.25,10.9266 L19.2501673,6.79366698 C19.2540602,6.64321292 19.1353696,6.51803017 18.9986,6.51409997 L13.0150785,6.51391283 C12.8646304,6.51803017 12.7459398,6.64321292 12.75,6.80659997 L12.75,10.9266 Z M13.5,14.7217 L14.5,14.7217 L14.5,22.25 L13.5,22.25 L13.5,14.7217 Z M17.5,14.7217 L18.5,14.7217 L18.5,22.25 L17.5,22.25 L17.5,14.7217 Z\\"></path></svg><span class=\\"utility-button__text\\">actions.delete</span></button></div></header><form class=\\" css-45hpsz-Form ezbpect0\\" data-id=\\"submit\\"><div class=\\"wide css-1idpiku-Wrapper eon8abq0\\"><label for=\\"text-input-1\\" class=\\"css-6arrr7-PrimaryLabel-SecondaryLabel e11et4nf1\\">settings.export_targets.name_label</label><input id=\\"text-input-1\\" name=\\"attributes[name]\\" type=\\"text\\" placeholder=\\"settings.export_targets.name_placeholder\\" aria-describedby=\\"text-input-error-1 text-input-instructions-1\\" class=\\"css-4cq9a0-BaseInput-SecondaryInput e1e2hl9r4\\" value=\\"test export target\\"></div><div class=\\"wide css-1idpiku-Wrapper eon8abq0\\"><label for=\\"text-input-1\\" class=\\"css-6arrr7-PrimaryLabel-SecondaryLabel e11et4nf1\\">settings.export_targets.format_label</label><input id=\\"text-input-1\\" name=\\"attributes[configuration][targetNameFormat]\\" type=\\"text\\" placeholder=\\"%s.%e\\" aria-describedby=\\"text-input-error-1 text-input-instructions-1\\" class=\\"css-4cq9a0-BaseInput-SecondaryInput e1e2hl9r4\\" value=\\"%s-%t.%e\\"></div><div class=\\"css-1idpiku-Wrapper eon8abq0\\"><label for=\\"select-1\\" class=\\"css-6arrr7-PrimaryLabel-SecondaryLabel e11et4nf1\\">settings.export_targets.type_label</label><div class=\\"css-e6curp-SecondarySelectWrapper exv2xkc7\\"><svg xmlns=\\"http://www.w3.org/2000/svg\\" class=\\"manicon-svg css-nnaksz-Icon exv2xkc1 svg-icon--disclosureDown24\\" width=\\"24\\" height=\\"24\\" viewBox=\\"0 0 24 24\\" fill=\\"currentColor\\" aria-hidden=\\"true\\"><polygon points=\\"20.374 9 21 9.78 12 17 3 9.78 3.626 9 12 15.718\\"></polygon></svg><select id=\\"select-1\\" aria-describedby=\\"select-error-1 select-instructions-1\\" class=\\"css-zhm7ug-BaseSelect-SecondarySelect exv2xkc3\\"><option value=\\"sftp_key\\">settings.export_targets.type_options.sftp_key</option><option value=\\"sftp_password\\">settings.export_targets.type_options.sftp_password</option></select></div></div><div class=\\"wide css-1idpiku-Wrapper eon8abq0\\"><label for=\\"text-input-1\\" class=\\"css-6arrr7-PrimaryLabel-SecondaryLabel e11et4nf1\\">settings.export_targets.host_label</label><input id=\\"text-input-1\\" name=\\"attributes[configuration][sftpKey][host]\\" type=\\"text\\" placeholder=\\"settings.export_targets.host_placeholder\\" aria-describedby=\\"text-input-error-1 text-input-instructions-1\\" class=\\"css-4cq9a0-BaseInput-SecondaryInput e1e2hl9r4\\" value=\\"172.217.3.164\\"></div><div class=\\"wide css-1idpiku-Wrapper eon8abq0\\"><label for=\\"text-input-1\\" class=\\"css-6arrr7-PrimaryLabel-SecondaryLabel e11et4nf1\\">settings.export_targets.port_label</label><input id=\\"text-input-1\\" name=\\"attributes[configuration][sftpKey][port]\\" type=\\"text\\" placeholder=\\"22\\" aria-describedby=\\"text-input-error-1 text-input-instructions-1\\" class=\\"css-4cq9a0-BaseInput-SecondaryInput e1e2hl9r4\\" value=\\"2\\"></div><div class=\\"wide css-1idpiku-Wrapper eon8abq0\\"><label for=\\"text-input-1\\" class=\\"css-6arrr7-PrimaryLabel-SecondaryLabel e11et4nf1\\">settings.export_targets.username_label</label><input id=\\"text-input-1\\" name=\\"attributes[configuration][sftpKey][username]\\" type=\\"text\\" placeholder=\\"settings.export_targets.username_placeholder\\" aria-describedby=\\"text-input-error-1 text-input-instructions-1\\" class=\\"css-4cq9a0-BaseInput-SecondaryInput e1e2hl9r4\\" value=\\"rambo\\"></div><div class=\\"wide css-1idpiku-Wrapper eon8abq0\\"><label for=\\"textarea-1\\" class=\\"css-6arrr7-PrimaryLabel-SecondaryLabel e11et4nf1\\">settings.export_targets.private_key_label</label><textarea id=\\"textarea-1\\" name=\\"attributes[configuration][sftpKey][privateKey]\\" aria-describedby=\\"textarea-error-1 textarea-instructions-1\\" style=\\"height: 100px;\\" class=\\"css-fcy7ah-TextAreaBase-TextAreaSecondary epknsgy0\\">testprivatekey</textarea></div><div class=\\"wide ep2gwrw0 css-og67sx-Wrapper-FormButtonsWrapper eon8abq0\\"><input class=\\"button-secondary button-secondary--outlined\\" type=\\"submit\\" value=\\"settings.export_targets.submit_label\\"></div></form></section>"`;
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`backend/containers/makers/Edit matches the snapshot when rendered 1`] = `"<header class=\\"css-ibt74g-Header ewz6knw5\\"><h2 class=\\" css-4532mb-TitleWrapper ewz6knw4\\"><span class=\\"css-183oh9-Title ewz6knw2\\">John Milton</span></h2><div class=\\"utility-button-group utility-button-group--inline css-hnxvlr-ButtonGroup ewz6knw0\\"></div></header><section></section>"`;
exports[`backend/containers/makers/Edit matches the snapshot when rendered 1`] = `"<header class=\\"css-ibt74g-Header ewz6knw5\\"><h2 class=\\" css-4532mb-TitleWrapper ewz6knw4\\"><span class=\\"css-183oh9-Title ewz6knw2\\">John Milton</span></h2><div class=\\"utility-button-group utility-button-group--inline css-5f51mp-ButtonGroup ewz6knw0\\"></div></header><section></section>"`;
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`backend/containers/permission/Edit matches the snapshot when rendered 1`] = `"<header class=\\"css-ibt74g-Header ewz6knw5\\"><h2 class=\\" css-4532mb-TitleWrapper ewz6knw4\\"><span class=\\"css-183oh9-Title ewz6knw2\\">projects.permissions.edit_header</span></h2><div class=\\"utility-button-group utility-button-group--inline css-hnxvlr-ButtonGroup ewz6knw0\\"><button class=\\"utility-button\\" type=\\"button\\"><svg xmlns=\\"http://www.w3.org/2000/svg\\" class=\\"manicon-svg utility-button__icon--notice utility-button__icon svg-icon--delete32\\" width=\\"24\\" height=\\"24\\" viewBox=\\"0 0 32 32\\" fill=\\"currentColor\\" aria-hidden=\\"true\\"><path d=\\"M22.5006476,10.9603607 L23.4993524,11.0112392 L22.8010808,24.6917831 C22.8222428,25.6607758 22.05432,26.4636781 21.074,26.4858 L10.9146542,26.4856713 C9.94567997,26.4636781 9.17775722,25.6607758 9.19944755,24.7281393 L8.50064755,11.0112392 L9.49935241,10.9603607 L10.1986808,24.713617 C10.1895701,25.1307915 10.5201792,25.4764602 10.926,25.4858 L21.0626542,25.4859288 C21.4798208,25.4764602 21.8104299,25.1307915 21.8018476,24.6772608 L22.5006476,10.9603607 Z M5.99999997,11.4266 L5.99999997,10.4266 L26,10.4266 L26,11.4266 L5.99999997,11.4266 Z M12.75,10.9266 L11.75,10.9266 L11.7501673,6.81953297 C11.732004,6.11756111 12.2857775,5.53349733 13.0014,5.51409997 L19.0122785,5.5142871 C19.7142225,5.53349733 20.267996,6.11756111 20.25,6.80659997 L20.25,10.9266 L19.25,10.9266 L19.2501673,6.79366698 C19.2540602,6.64321292 19.1353696,6.51803017 18.9986,6.51409997 L13.0150785,6.51391283 C12.8646304,6.51803017 12.7459398,6.64321292 12.75,6.80659997 L12.75,10.9266 Z M13.5,14.7217 L14.5,14.7217 L14.5,22.25 L13.5,22.25 L13.5,14.7217 Z M17.5,14.7217 L18.5,14.7217 L18.5,22.25 L17.5,22.25 L17.5,14.7217 Z\\"></path></svg><span class=\\"utility-button__text\\">actions.delete</span></button></div></header><section></section>"`;
exports[`backend/containers/permission/Edit matches the snapshot when rendered 1`] = `"<header class=\\"css-ibt74g-Header ewz6knw5\\"><h2 class=\\" css-4532mb-TitleWrapper ewz6knw4\\"><span class=\\"css-183oh9-Title ewz6knw2\\">projects.permissions.edit_header</span></h2><div class=\\"utility-button-group utility-button-group--inline css-5f51mp-ButtonGroup ewz6knw0\\"><button class=\\"utility-button\\" type=\\"button\\"><svg xmlns=\\"http://www.w3.org/2000/svg\\" class=\\"manicon-svg utility-button__icon--notice utility-button__icon svg-icon--delete32\\" width=\\"24\\" height=\\"24\\" viewBox=\\"0 0 32 32\\" fill=\\"currentColor\\" aria-hidden=\\"true\\"><path d=\\"M22.5006476,10.9603607 L23.4993524,11.0112392 L22.8010808,24.6917831 C22.8222428,25.6607758 22.05432,26.4636781 21.074,26.4858 L10.9146542,26.4856713 C9.94567997,26.4636781 9.17775722,25.6607758 9.19944755,24.7281393 L8.50064755,11.0112392 L9.49935241,10.9603607 L10.1986808,24.713617 C10.1895701,25.1307915 10.5201792,25.4764602 10.926,25.4858 L21.0626542,25.4859288 C21.4798208,25.4764602 21.8104299,25.1307915 21.8018476,24.6772608 L22.5006476,10.9603607 Z M5.99999997,11.4266 L5.99999997,10.4266 L26,10.4266 L26,11.4266 L5.99999997,11.4266 Z M12.75,10.9266 L11.75,10.9266 L11.7501673,6.81953297 C11.732004,6.11756111 12.2857775,5.53349733 13.0014,5.51409997 L19.0122785,5.5142871 C19.7142225,5.53349733 20.267996,6.11756111 20.25,6.80659997 L20.25,10.9266 L19.25,10.9266 L19.2501673,6.79366698 C19.2540602,6.64321292 19.1353696,6.51803017 18.9986,6.51409997 L13.0150785,6.51391283 C12.8646304,6.51803017 12.7459398,6.64321292 12.75,6.80659997 L12.75,10.9266 Z M13.5,14.7217 L14.5,14.7217 L14.5,22.25 L13.5,22.25 L13.5,14.7217 Z M17.5,14.7217 L18.5,14.7217 L18.5,22.25 L17.5,22.25 L17.5,14.7217 Z\\"></path></svg><span class=\\"utility-button__text\\">actions.delete</span></button></div></header><section></section>"`;

Large diffs are not rendered by default.

Loading

0 comments on commit 44ada2a

Please sign in to comment.