Skip to content
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

feat(Datasets): restrict dataset deletion only to creators and super-users #1713

Merged
merged 4 commits into from Sep 13, 2022

Conversation

frascuchon
Copy link
Member

@frascuchon frascuchon commented Sep 13, 2022

This PR includes restrictions on dataset deletion. Only datasets the creator or super-users (with full workspaces access) can delete datasets

@dvsrepo just review the error message, pls

@frascuchon frascuchon added this to In progress in Release via automation Sep 13, 2022
@frascuchon frascuchon modified the milestones: v0.17.0, v0.18.0 Sep 13, 2022
src/rubrix/server/services/datasets.py Outdated Show resolved Hide resolved
@frascuchon frascuchon removed this from In progress in Release Sep 13, 2022
@codecov
Copy link

codecov bot commented Sep 13, 2022

Codecov Report

Base: 95.66% // Head: 95.64% // Decreases project coverage by -0.02% ⚠️

Coverage data is based on head (05cb694) compared to base (6d82717).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1713      +/-   ##
==========================================
- Coverage   95.66%   95.64%   -0.03%     
==========================================
  Files         147      147              
  Lines        6720     6722       +2     
==========================================
  Hits         6429     6429              
- Misses        291      293       +2     
Flag Coverage Δ
pytest 95.64% <100.00%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/rubrix/server/services/datasets.py 98.09% <100.00%> (+0.03%) ⬆️
...ubrix/labeling/text_classification/label_errors.py 86.74% <0.00%> (-3.62%) ⬇️
src/rubrix/server/errors/base_errors.py 98.52% <0.00%> (+1.47%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Co-authored-by: Daniel Vila Suero <daniel@recogn.ai>
@frascuchon frascuchon merged commit c5ab270 into master Sep 13, 2022
@frascuchon frascuchon deleted the feature/only-creator-can-delete-a-dataset branch September 13, 2022 14:24
frascuchon added a commit that referenced this pull request Sep 27, 2022
…users (#1713)

* feat(Datasets): restrict dataset deletion only to creators and super-users

* tests: add tests for datasets deletion check

* chore: improve deletion error message

Co-authored-by: Daniel Vila Suero <daniel@recogn.ai>

* Format long strings

Co-authored-by: Daniel Vila Suero <daniel@recogn.ai>
(cherry picked from commit c5ab270)
frascuchon added a commit that referenced this pull request Sep 27, 2022
…users (#1713)

* feat(Datasets): restrict dataset deletion only to creators and super-users

* tests: add tests for datasets deletion check

* chore: improve deletion error message

Co-authored-by: Daniel Vila Suero <daniel@recogn.ai>

* Format long strings

Co-authored-by: Daniel Vila Suero <daniel@recogn.ai>
(cherry picked from commit c5ab270)
frascuchon added a commit that referenced this pull request Sep 27, 2022
…users (#1713)

* feat(Datasets): restrict dataset deletion only to creators and super-users

* tests: add tests for datasets deletion check

* chore: improve deletion error message

Co-authored-by: Daniel Vila Suero <daniel@recogn.ai>

* Format long strings

Co-authored-by: Daniel Vila Suero <daniel@recogn.ai>
(cherry picked from commit c5ab270)
frascuchon added a commit that referenced this pull request Sep 27, 2022
…users (#1713)

* feat(Datasets): restrict dataset deletion only to creators and super-users

* tests: add tests for datasets deletion check

* chore: improve deletion error message

Co-authored-by: Daniel Vila Suero <daniel@recogn.ai>

* Format long strings

Co-authored-by: Daniel Vila Suero <daniel@recogn.ai>
(cherry picked from commit c5ab270)
frascuchon added a commit that referenced this pull request Sep 29, 2022
…users (#1713)

* feat(Datasets): restrict dataset deletion only to creators and super-users

* tests: add tests for datasets deletion check

* chore: improve deletion error message

Co-authored-by: Daniel Vila Suero <daniel@recogn.ai>

* Format long strings

Co-authored-by: Daniel Vila Suero <daniel@recogn.ai>
(cherry picked from commit c5ab270)
frascuchon added a commit that referenced this pull request Sep 30, 2022
Since the changes included in #1713, users without permission trying to delete datasets from UI will hit into a re-login operation.

This PR handles separate authentication errors (401) and forbidden errors (403).

We should find a better way to handle error codes and info in general.

Refs: #1713
frascuchon added a commit that referenced this pull request Sep 30, 2022
Since the changes included in #1713, users without permission trying to delete datasets from UI will hit into a re-login operation.

This PR handles separate authentication errors (401) and forbidden errors (403).

We should find a better way to handle error codes and info in general.

Refs: #1713
frascuchon added a commit that referenced this pull request Sep 30, 2022
…users (#1713)

* feat(Datasets): restrict dataset deletion only to creators and super-users

* tests: add tests for datasets deletion check

* chore: improve deletion error message

Co-authored-by: Daniel Vila Suero <daniel@recogn.ai>

* Format long strings

Co-authored-by: Daniel Vila Suero <daniel@recogn.ai>

(cherry picked from commit c5ab270)
fix: handle separately 401 and 403 api errors in UI (#1740)

Since the changes included in #1713, users without permission trying to delete datasets from UI will hit into a re-login operation.

This PR handles separate authentication errors (401) and forbidden errors (403).

We should find a better way to handle error codes and info in general.
frascuchon added a commit that referenced this pull request Oct 3, 2022
…users (#1713)

* feat(Datasets): restrict dataset deletion only to creators and super-users

* tests: add tests for datasets deletion check

* chore: improve deletion error message

Co-authored-by: Daniel Vila Suero <daniel@recogn.ai>

* Format long strings

Co-authored-by: Daniel Vila Suero <daniel@recogn.ai>

(cherry picked from commit c5ab270)
fix: handle separately 401 and 403 api errors in UI (#1740)

Since the changes included in #1713, users without permission trying to delete datasets from UI will hit into a re-login operation.

This PR handles separate authentication errors (401) and forbidden errors (403).

We should find a better way to handle error codes and info in general.
frascuchon added a commit that referenced this pull request Oct 4, 2022
…users (#1713)

* feat(Datasets): restrict dataset deletion only to creators and super-users

* tests: add tests for datasets deletion check

* chore: improve deletion error message

Co-authored-by: Daniel Vila Suero <daniel@recogn.ai>

* Format long strings

Co-authored-by: Daniel Vila Suero <daniel@recogn.ai>

(cherry picked from commit c5ab270)
fix: handle separately 401 and 403 api errors in UI (#1740)

Since the changes included in #1713, users without permission trying to delete datasets from UI will hit into a re-login operation.

This PR handles separate authentication errors (401) and forbidden errors (403).

We should find a better way to handle error codes and info in general.
frascuchon added a commit that referenced this pull request Oct 5, 2022
…users (#1713)

* feat(Datasets): restrict dataset deletion only to creators and super-users

* tests: add tests for datasets deletion check

* chore: improve deletion error message

Co-authored-by: Daniel Vila Suero <daniel@recogn.ai>

* Format long strings

Co-authored-by: Daniel Vila Suero <daniel@recogn.ai>

(cherry picked from commit c5ab270)
fix: handle separately 401 and 403 api errors in UI (#1740)

Since the changes included in #1713, users without permission trying to delete datasets from UI will hit into a re-login operation.

This PR handles separate authentication errors (401) and forbidden errors (403).

We should find a better way to handle error codes and info in general.
frascuchon added a commit that referenced this pull request Oct 5, 2022
…users (#1713)

* feat(Datasets): restrict dataset deletion only to creators and super-users

* tests: add tests for datasets deletion check

* chore: improve deletion error message

Co-authored-by: Daniel Vila Suero <daniel@recogn.ai>

* Format long strings

Co-authored-by: Daniel Vila Suero <daniel@recogn.ai>

(cherry picked from commit c5ab270)
fix: handle separately 401 and 403 api errors in UI (#1740)

Since the changes included in #1713, users without permission trying to delete datasets from UI will hit into a re-login operation.

This PR handles separate authentication errors (401) and forbidden errors (403).

We should find a better way to handle error codes and info in general.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants