Context:
Once the collection scope is in place we need to enforce reports comply with it.
This means reports that don't comply with the scope cannot be saved, instead a conflict response is returned indicating the scope violation.
AT:
- on report create/update/copy&move the compliance with the current collection scope is validated
- a conflict response is returned indicating the scope violation
- a report is in a scope, if all of the following criteria match for at least one scope entry:
- the definition keys match
- the definition types match
- the scope contains all tenants of the report
- the scope violation error message can be translated and has a new dedicated error code. The message should not state the scope that's being violated but rather the affected collection.
- copy & move for combined reports and dashboards checks every contained report if it's in the scope and raises a conflict a soon as one of the reports is not within the scope of the target collection
- the conflict response is documented on the report api
Note:
This may break e2e tests that work with collections and don't handle the scope yet. Should be addressed beforehand with OPT-2881.
This is the controller panel for Smart Panels app
- depends on
-
OPT-2881 add end to end tests
- Done