Skip to content

Commit

Permalink
Retrieve acl permissions for selected org and project
Browse files Browse the repository at this point in the history
Signed-off-by: Dinika Saxena <[email protected]>
  • Loading branch information
Dinika committed Aug 16, 2023
1 parent 01df800 commit fe4d55f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/shared/components/ResourceEditor/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { useEditorPopover, useEditorTooltip } from './useEditorTooltip';
import { DATA_EXPLORER_GRAPH_FLOW_PATH } from '../../store/reducers/data-explorer';
import ResourceResolutionCache from './ResourcesLRUCache';
import './ResourceEditor.less';

export interface ResourceEditorProps {
rawData: { [key: string]: any };
onSubmit: (rawData: { [key: string]: any }) => void;
Expand Down
7 changes: 6 additions & 1 deletion src/shared/components/ResourceForm/ResourceCreateUpload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,12 @@ const ResourceCreateUpload: React.FunctionComponent<{
return (
<div className="add-resource">
<div className="add-resource__editor">
<ResourceForm onSubmit={(r: any) => saveAndCreate(r)} busy={formBusy} />
<ResourceForm
onSubmit={(r: any) => saveAndCreate(r)}
busy={formBusy}
orgLabel={orgLabel}
projectLabel={projectLabel}
/>
</div>
<div className="add-resource__upload">
<FileUploadContainer orgLabel={orgLabel} projectLabel={projectLabel} />
Expand Down
8 changes: 6 additions & 2 deletions src/shared/components/ResourceForm/ResourceForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ export interface ResourceFormProps {
}): Promise<boolean>;
onDeprecate?(): any;
mode?: 'create' | 'edit';
orgLabel: string;
projectLabel: string;
}

/**
Expand All @@ -94,6 +96,8 @@ const ResourceForm: React.FunctionComponent<ResourceFormProps> = ({
onSubmit,
onDeprecate = () => {},
mode = 'create',
orgLabel,
projectLabel,
}) => {
const [jsonValue, setJsonValue] = React.useState<{ [key: string]: any }>(
DEFAULT_RESOURCE
Expand Down Expand Up @@ -175,8 +179,8 @@ const ResourceForm: React.FunctionComponent<ResourceFormProps> = ({
onSubmit={handleSubmit}
showExpanded={false}
showMetadataToggle={false}
orgLabel=""
projectLabel=""
orgLabel={orgLabel}
projectLabel={projectLabel}
onFullScreen={() => {}}
showFullScreen={false}
/>
Expand Down

0 comments on commit fe4d55f

Please sign in to comment.