Skip to content

#520 Remove URLPathChecker- and PermissionsFilter

Merge Request

💣 Breaking Changes

  • Referenced Payload requests no longer return empty lists but return an error message if i.e., user permissions are not correct to retrieve payload
  • It is expected to have a changed error status codes and error messages for specific requests. This is due to that before this refactoring the error handling sometimes was incosistent between the endpoints. Now we expect the same error behavior for all endpoints. Returning a 404 HTTP status code whenever a resource could not be found, or a 403 when the user has not enough permissions to read/ write/ manage that resource.

🥅 Description

This MR refactors the permission and validation structure in shepard. It removes the UrlPathChecker filter and uses the refactored PermissionService, to bring all permission and existence checks of resources to the service layer.

This means that most of the logic from endpoints or the UrlPathCheckerFilter middleware has been moved the according services. Furthermore, this MR makes use of the service layer logic as much as possible, and tries to only use the DAO layer when it is really needed.

📓 Checklist

  • The code compiles without any warnings.
  • I followed the code review checklist.
  • The documentation has been added/updated.

🔗 Related Issues

Edited by Maximilian Heykeroth

Merge request reports

Loading