You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The PUT /dataModels/{{data_model_id}}/dataClasses/clean and {{base_url}}/dataModels/{{data_model_id}}/dataTypes/clean endpoints give a 403 Forbidden error when called.
Steps to reproduce
Logged in as an admin user, create a new data model with default data types containing only an empty data class.
Call the PUT /dataModels/{{data_model_id}}/dataClasses/clean and {{base_url}}/dataModels/{{data_model_id}}/dataTypes/clean as the admin user.
A 403 error is returned, e.g.:
{
"path": "/api/dataModels/0244b8d9-b3e3-49c2-81a4-63c0bd5149c2/dataClasses/clean",
"additional": "User does not have the necessary permissions"
}
Expected behavior
Unused data types or data classes should be deleted from the data model when called by a user with appropriate permissions.
Environment
mdm-core latest develop
Additional context
When logged in as admin user, access to the endpoints is prevented at TieredAccessSecurableResourceInterceptor.groovy, line 81.
The text was updated successfully, but these errors were encountered:
basically we added these for MDC for james and I to use to clean up some DMs, they were never intended for public consumption and we never really used them. So yes, lets delete the endpoints and the controller methods
- Delete dataTypes/clean and dataClasses/clean endpoints and controllers from datamodel plugin (resolvesgh-272 error due to permissions)
- Delete dataTypes/clean endpoint and controller from referencedata plugin (endpoint gave error due to mapping issue)
Description
The
PUT /dataModels/{{data_model_id}}/dataClasses/clean
and{{base_url}}/dataModels/{{data_model_id}}/dataTypes/clean
endpoints give a 403 Forbidden error when called.Steps to reproduce
PUT /dataModels/{{data_model_id}}/dataClasses/clean
and{{base_url}}/dataModels/{{data_model_id}}/dataTypes/clean
as the admin user.Expected behavior
Unused data types or data classes should be deleted from the data model when called by a user with appropriate permissions.
Environment
Additional context
When logged in as admin user, access to the endpoints is prevented at TieredAccessSecurableResourceInterceptor.groovy, line 81.
The text was updated successfully, but these errors were encountered: