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: Allow external iris for property and resource class when updating doap (DEV-4341) #3425

Merged
merged 39 commits into from
Nov 20, 2024

Conversation

seakayone
Copy link
Contributor

@seakayone seakayone commented Nov 14, 2024

deprecated: Deprecate endpoints for updating a Default Access Permission in favor of newly introduces PUT /admin/permissions/doap/:permissionIri endpoint

Deprecated endpoints:

  • PUT /admin/permissions/:permissionIri/resourceClass
  • PUT /admin/permissions/:permissionIri/property
  • PUT /admin/permissions/:permissionIri/group (deprecated only for DOAPs)
  • PUT /admin/permissions/:permissionIri/hasPermission (deprecated only for DOAPs)

Pull Request Checklist

Task Description/Number

Issue Number: DEV-

PR Type

  • build/chore: maintenance tasks (no production code change)
  • docs: documentation changes (no production code change)
  • feat: represents new features
  • fix: represents bug fixes
  • perf: performance improvements
  • refactor: represents production code refactoring
  • test: adding or refactoring tests (no production code change)
  • deprecated: Deprecation warning (ideally referencing a migration guide)

Basic requirements for bug fixes and features

  • Tests for the changes have been added
  • Docs have been added / updated

Does this PR introduce a breaking change?

  • Yes

Copy link

linear bot commented Nov 14, 2024

@seakayone seakayone self-assigned this Nov 14, 2024
@seakayone seakayone requested a review from jnussbaum November 14, 2024 07:36
@seakayone seakayone changed the title fix: Allow external iris for property and resource class when updating doap fix: Allow external iris for property and resource class when updating doap (DEV-4341) Nov 14, 2024
Copy link

linear bot commented Nov 14, 2024

@seakayone seakayone changed the title fix: Allow external iris for property and resource class when updating doap (DEV-4341) feat: Allow external iris for property and resource class when updating doap (DEV-4341) Nov 14, 2024
@seakayone
Copy link
Contributor Author

I have added a new endpoint PUT /admin/permissions/doap/:permissionIri which allows for updating an existing doap. This is deprecating existing endpoints as described above. I also updated the documentation.

Please have another review.

@seakayone seakayone requested review from jnussbaum and mpro7 November 14, 2024 16:52
@seakayone seakayone disabled auto-merge November 15, 2024 15:33
@seakayone seakayone requested a review from jnussbaum November 16, 2024 10:15
Copy link
Contributor

@jnussbaum jnussbaum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your efforts. I have just looked at the documentation. If you think there is a particular code region where I should look at, I would need some directions.

I don't know how our deprecation process looks like. Perhaps you need to inform the frontend team about it?

docs/03-endpoints/api-admin/permissions.md Show resolved Hide resolved
docs/03-endpoints/api-admin/permissions.md Outdated Show resolved Hide resolved
docs/03-endpoints/api-admin/permissions.md Outdated Show resolved Hide resolved
docs/03-endpoints/api-admin/permissions.md Outdated Show resolved Hide resolved
docs/03-endpoints/api-admin/permissions.md Outdated Show resolved Hide resolved
docs/03-endpoints/api-admin/permissions.md Outdated Show resolved Hide resolved
docs/03-endpoints/api-admin/permissions.md Outdated Show resolved Hide resolved
Comment on lines 287 to 288
"forProperty" : "http://api.dasch.swiss/ontology/00FF/images/v2#titel",
"forResourceClass": "http://api.dasch.swiss/ontology/0803/incunabula/v2#bild",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't you like this comment? You have resolved it, but not changed the documentation.

docs/03-endpoints/api-admin/permissions.md Show resolved Hide resolved
@mpro7
Copy link
Contributor

mpro7 commented Nov 18, 2024

Forgot to ask. Should this PR be marked actually as deprecated instead of feat?

Copy link

codecov bot commented Nov 18, 2024

Codecov Report

Attention: Patch coverage is 3.36134% with 115 lines in your changes missing coverage. Please review.

Project coverage is 19.04%. Comparing base (6ebe8e7) to head (453d555).
Report is 134 commits behind head on main.

Files with missing lines Patch % Lines
...webapi/responders/admin/PermissionsResponder.scala 0.00% 56 Missing ⚠️
.../webapi/slice/admin/api/PermissionsEndpoints.scala 0.00% 30 Missing ⚠️
...main/model/DefaultObjectAccessPermissionRepo.scala 0.00% 10 Missing ⚠️
...lice/admin/api/service/PermissionRestService.scala 0.00% 9 Missing ⚠️
...a/webapi/slice/admin/domain/model/Permission.scala 50.00% 3 Missing ⚠️
...service/DefaultObjectAccessPermissionService.scala 0.00% 3 Missing ⚠️
...slice/admin/api/PermissionsEndpointsHandlers.scala 0.00% 2 Missing ⚠️
webapi/src/main/scala/dsp/errors/Errors.scala 0.00% 1 Missing ⚠️
...ebapi/slice/resourceinfo/domain/IriConverter.scala 50.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #3425       +/-   ##
===========================================
- Coverage   83.04%   19.04%   -64.00%     
===========================================
  Files         290      308       +18     
  Lines       23087    22764      -323     
===========================================
- Hits        19172     4336    -14836     
- Misses       3915    18428    +14513     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@seakayone
Copy link
Contributor Author

Forgot to ask. Should this PR be marked actually as deprecated instead of feat?

It is both, the deprecated notice in the description should show up in the release notes as well as far as I understand.

@seakayone seakayone requested a review from jnussbaum November 18, 2024 13:23
seakayone and others added 3 commits November 19, 2024 14:28
Co-authored-by: Johannes Nussbaum <39048939+jnussbaum@users.noreply.github.com>
Co-authored-by: Johannes Nussbaum <39048939+jnussbaum@users.noreply.github.com>
Co-authored-by: Johannes Nussbaum <39048939+jnussbaum@users.noreply.github.com>
@seakayone seakayone requested a review from jnussbaum November 19, 2024 13:29
@seakayone seakayone merged commit 6ecc9ee into main Nov 20, 2024
7 checks passed
@seakayone seakayone deleted the fix/allow-external-iri-for-doap-update-DEV-4286 branch November 20, 2024 08:09
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.

4 participants