john-bodley commented on code in PR #24806:
URL: https://github.com/apache/superset/pull/24806#discussion_r1283946366


##########
tests/integration_tests/dashboards/security/security_rbac_tests.py:
##########
@@ -432,3 +441,77 @@ def 
test_cannot_get_draft_dashboard_with_roles_by_uuid(self):
         # rollback changes
         db.session.delete(dashboard)
         db.session.commit()
+
+    @with_feature_flags(DASHBOARD_RBAC=True)
+    @pytest.mark.usefixtures("load_world_bank_dashboard_with_slices")
+    def test_api_copy_dashboard(self):
+        source = 
db.session.query(Dashboard).filter_by(slug="world_health").first()
+        source.roles = [self.get_role("Gamma")]
+        db.session.commit()
+
+        uri = f"api/v1/dashboard/{source.id}/copy/"
+
+        data = {
+            "dashboard_title": "copied dash",
+            "css": "<css>",
+            "duplicate_slices": False,
+            "json_metadata": json.dumps(
+                {
+                    "positions": source.position,
+                    "color_namespace": "Color Namespace Test",
+                    "color_scheme": "Color Scheme Test",
+                }
+            ),
+        }
+
+        self.login(username="gamma")
+        rv = self.client.post(uri, json=data)

Review Comment:
   This is currently failing because it's leveraging logic from 
https://github.com/apache/superset/pull/24789, i.e., I can't see the point 
setting up the dashboard filter logic (from a permission standpoint) which will 
be obsolete after said PR is merged.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to