Currently, when the artifacts deletion is blocked (disabled or limit exceeded), nothing prevents the user to enter an artifact id, submit and confirm the deletion. Since community #37589 has been implemented, the whole action ends up in error.
The porposition is the following:
- When the artifacts deletion is deactivated (limit = 0), we display an error message saying "Artifacts deletion is disabled" and disable the form on this page
- When the limit set at site-admin level is exceeded by the current user, we display an error message saying "Limit is exceeded, please come back later" and disable the form on this page.
Since the page is generated in legacy code (echo html), it's a great opportunity to do a refactoring to have the page served by the front-router and generated using controller/presenter/mustache template.
Note: The UI of the artifacts deletion limit on site-admin's side says that the limit is applied only at REST API level. We should also mention that the limit is applied at UI level.