-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extension of cloud storage server part #3386
Conversation
cvat/apps/engine/views.py
Outdated
specific_attributes = serializer.validated_data.get('specific_attributes', '') | ||
|
||
check_cloud_storage_existing(provider_type, credentials_type, session_token, account_name, | ||
key, secret_key, resource, specific_attributes) | ||
owner = self.request.data.get('owner') | ||
if owner: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we consider owner to be a user who does not send the request? In theory I can create a storage and make owner a user who I do not know accidentally. This user might get access to private data.
60f348a
to
070dbcf
Compare
@@ -223,6 +223,9 @@ def load(self): | |||
self._index = json.load(index_file, | |||
object_hook=lambda d: {int(k): v for k, v in d.items()}) | |||
|
|||
def remove(self): | |||
os.remove(self._path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't self.path be null or something like that after deleting?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, it shouldn't
@azhavoro , @bsekachev What do you think about this? |
3eb6a81
to
c1f68a7
Compare
@@ -6,7 +6,7 @@ | |||
class Migration(migrations.Migration): | |||
|
|||
dependencies = [ | |||
('engine', '0040_cloud_storage'), | |||
('engine', '0041_auto_20210813_0853'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this is the right way, maybe reordering the migration is here. Please make sure this works if migration "0040" has already been applied.
@azhavoro, Do you have any other comments? |
@Marishka17 LGTM |
Motivation and context
This PR contains:
How has this been tested?
Checklist
develop
branch- [ ] I have linked related issues (read github docs)- [ ] I have increased versions of npm packages if it is necessary (cvat-canvas,cvat-core, cvat-data and cvat-ui)
License
Feel free to contact the maintainers if that's a concern.