Skip to content

Commit

Permalink
Fixed rules around enabling
Browse files Browse the repository at this point in the history
  • Loading branch information
rmathis committed Oct 19, 2022
1 parent 06b75a1 commit a2badf4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ui/src/app/metadata/domain/source/component/SourceList.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export default function SourceList({ entities, onDelete, onEnable, onApprove, on
<td className="align-middle"><FormattedDate date={source.createdDate} /></td>
<td className="text-center align-middle">
<span className="d-flex justify-content-center align-items-center">
{onEnable && (canEnable || source.approved) ?
{onEnable && (canEnable && source.approved) ?
<Form.Check
type="switch"
id={`enable-switch-${source.id}`}
Expand Down
2 changes: 1 addition & 1 deletion ui/src/app/metadata/view/MetadataOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export function MetadataOptions ({reload}) {
model={metadata}
showGroup={type === 'source'}>
<div className="d-flex align-items-start btn-group">
{enable && (canEnable || metadata.approved) &&
{enable && (canEnable && metadata.approved) &&
<Button variant={enabled ? 'outline-secondary' : 'outline-secondary' } size="sm" className=""
onClick={() => enable(metadata, !enabled, reload)}>
<span className=" me-1">
Expand Down

0 comments on commit a2badf4

Please sign in to comment.