Skip to content

Commit

Permalink
feat: Enabling S3 bucket share
Browse files Browse the repository at this point in the history
  • Loading branch information
anushka-singh committed Nov 10, 2023
1 parent 06edb53 commit f43003c
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 24 deletions.
19 changes: 0 additions & 19 deletions backend/dataall/modules/dataset_sharing/aws/kms_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,22 +69,3 @@ def check_key_exists(self, key_alias: str):
return None
else:
return key_exist

def add_tags_to_key(self, key_id: str, tags: list):
"""
Add tags to an existing AWS KMS key.
:param key_id: The ID of the KMS key to add tags to.
:param tags: A list of dictionaries containing the tags to be added. For example:
[{'TagKey': 'Purpose', 'TagValue': 'Test'}]
:return: None
"""
try:
self._client.tag_resource(
KeyId=key_id,
Tags=tags,
)
except Exception as e:
log.error(
f'Failed to add tags to kms key {key_id} : {e}'
)
raise e
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,6 @@ def upgrade():
shared_bucket_object.itemUri = dataset_bucket.bucketUri
shared_bucket_object.itemName = dataset_bucket.S3BucketName

if column_exists('dataset', 'dataSharingModel'):
op.drop_column('dataset', 'dataSharingModel')
session.commit()

except Exception as exception:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { Defaults, Pager, Scrollbar } from 'design';
import { SET_ERROR, useDispatch } from 'globalErrors';
import { useClient } from 'services';
import { addSharedItem, getShareObject } from '../services';
import { generateShareItemLabel } from '../../../utils/share';
import { generateShareItemLabel } from '../../../utils';

export const AddShareItemModal = (props) => {
const client = useClient();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { Defaults } from 'design';
import { SET_ERROR, useDispatch } from 'globalErrors';
import { useClient } from 'services';
import { getShareObject, revokeItemsShareObject } from '../services';
import { generateShareItemLabel } from '../../../utils/share';
import { generateShareItemLabel } from '../../../utils';

export const RevokeShareItemsModal = (props) => {
const client = useClient();
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/modules/Shares/views/ShareView.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ import {
UpdateRejectReason,
UpdateRequestReason
} from '../components';
import { generateShareItemLabel } from '../../../utils/share';
import { generateShareItemLabel } from '../../../utils';

function ShareViewHeader(props) {
const {
Expand Down
1 change: 1 addition & 0 deletions frontend/src/utils/index.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export * from './constants';
export * from './helpers';
export * from './share';

0 comments on commit f43003c

Please sign in to comment.