Skip to content

Commit

Permalink
ShareView remake (#1277)
Browse files Browse the repository at this point in the history
### Feature or Bugfix
- Feature


### Detail
- Share View page is reorganised. Now all important info is on one
screen.
- Red reminder to submit the draft
- Edit and Submission buttons call the Modal window for share editing.
User can save share as a draft or submit it.
- When request is created from Catalog, the modal window give user the
form for share editing and submission (or draft).

### Relates
- #1009 

### Security
Please answer the questions below briefly where applicable, or write
`N/A`. Based on
[OWASP 10](https://owasp.org/Top10/en/).

- Does this PR introduce or modify any input fields or queries - this
includes
fetching data from storage outside the application (e.g. a database, an
S3 bucket)?
  - Is the input sanitized?
- What precautions are you taking before deserializing the data you
consume?
  - Is injection prevented by parametrizing queries?
  - Have you ensured no `eval` or similar functions are used?
- Does this PR introduce any functionality or component that requires
authorization?
- How have you ensured it respects the existing AuthN/AuthZ mechanisms?
  - Are you logging failed auth attempts?
- Are you using or adding any cryptographic features?
  - Do you use a standard proven implementations?
  - Are the used keys controlled by the customer? Where are they stored?
- Are you introducing any new policies/roles/users?
  - Have you used the least-privilege principle? How?


By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.

---------

Co-authored-by: Sofia Sazonova <[email protected]>
  • Loading branch information
SofiaSazonova and Sofia Sazonova authored Jun 13, 2024
1 parent abdd9e8 commit 080fc98
Show file tree
Hide file tree
Showing 10 changed files with 1,402 additions and 729 deletions.
1 change: 1 addition & 0 deletions backend/dataall/modules/s3_datasets_shares/api/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@
gql.Field(name='requestPurpose', type=gql.String),
gql.Field(name='rejectPurpose', type=gql.String),
gql.Field(name='dataset', type=DatasetLink, resolver=resolve_dataset),
gql.Field(name='alreadyExisted', type=gql.Boolean),
gql.Field(name='consumptionData', type=gql.Ref('ConsumptionData'), resolver=resolve_consumption_data),
gql.Field(name='existingSharedItems', type=gql.Boolean, resolver=resolve_existing_shared_items),
gql.Field(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ def create_share_object(
elif not attached:
share_policy_service.attach_policy()
share = ShareObjectRepository.find_share(session, dataset, environment, principal_id, group_uri)
already_existed = share is not None
if not share:
share = ShareObject(
datasetUri=dataset.datasetUri,
Expand Down Expand Up @@ -249,6 +250,7 @@ def create_share_object(
resource_uri=share.shareUri,
resource_type=ShareObject.__name__,
)
share.alreadyExisted = already_existed
return share

@classmethod
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,6 @@ export const GlossarySearchResultItem = ({ hit }) => {
<RequestAccessModal
hit={hit}
onApply={handleRequestAccessModalClose}
onClose={handleRequestAccessModalClose}
open={isRequestAccessOpen}
stopLoader={() => setIsOpeningModal(false)}
/>
Expand Down
Loading

0 comments on commit 080fc98

Please sign in to comment.