Unverified Commit a6c0d5ab authored by Allison Suarez Miranda's avatar Allison Suarez Miranda Committed by GitHub

feat: make owners for certain tables uneditable (#800)

* made owners for tables where is_editable=false uneditable
Signed-off-by: 's avatarAllison Suarez Miranda <asuarezmiranda@lyft.com>

* added config, waiting on confirmation about desired behavior
Signed-off-by: 's avatarAllison Suarez Miranda <asuarezmiranda@lyft.com>

* wip
Signed-off-by: 's avatarAllison Suarez Miranda <asuarezmiranda@lyft.com>

* no config
Signed-off-by: 's avatarAllison Suarez Miranda <asuarezmiranda@lyft.com>

* should be good now
Signed-off-by: 's avatarAllison Suarez Miranda <asuarezmiranda@lyft.com>
parent b67a9116
export const ERROR_MESSAGE = 'Something went wrong...';
export const EDIT_DESC_TEXT = 'Click to edit description in';
export const EDIT_OWNERS_TEXT = 'Click to edit owners in';
export const DATE_RANGE_TITLE = 'Date Range';
export const DESCRIPTION_TITLE = 'Description';
......
......@@ -289,6 +289,13 @@ export class TableDetail extends React.Component<
data.source.source_type
)}`
: '';
const ownersEditText = data.source
? // TODO rename getDescriptionSourceDisplayName to more generic since
// owners also edited on the same file?
`${Constants.EDIT_OWNERS_TEXT} ${getDescriptionSourceDisplayName(
data.source.source_type
)}`
: '';
const editUrl = data.source ? data.source.source : '';
innerContent = (
......@@ -396,7 +403,12 @@ export class TableDetail extends React.Component<
)}
</section>
<section className="right-panel">
<EditableSection title={Constants.OWNERS_TITLE}>
<EditableSection
title={Constants.OWNERS_TITLE}
readOnly={!data.is_editable}
editText={ownersEditText}
editUrl={editUrl || undefined}
>
<TableOwnerEditor resourceType={ResourceType.table} />
</EditableSection>
<section className="metadata-section">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment