docstr: Test that guest account has no access to other dashboards.
  
  A bug in the ``raise_for_access`` logic allowed the guest user to
  fetch data from other dashboards, as long as the other dashboard:
  
    - was not embedded AND
      - was not published OR
      - had at least 1 datasource that the user had access to.
docstr_tok: ["Test","that","guest","account","has","no","access","to","other","dashboards",".","A","bug","in","the","``","raise_for_access","``","logic","allowed","the","guest","user","to","fetch","data","from","other","dashboards",",","as","long","as","the","other","dashboard",":","-","was","not","embedded","AND","-","was","not","published","OR","-","had","at","least","1","datasource","that","the","user","had","access","to","."]
code: def test_raise_for_access_dashboard_as_guest_no_rbac(self):
      """
      Test that guest account has no access to other dashboards.
  
      A bug in the ``raise_for_access`` logic allowed the guest user to
      fetch data from other dashboards, as long as the other dashboard:
  
        - was not embedded AND
          - was not published OR
          - had at least 1 datasource that the user had access to.
  
      """
      g.user = self.unauthorized_guest
  
      # Create a draft dashboard that is not embedded
      dash = Dashboard()
      dash.dashboard_title = "My Dashboard"
      dash.published = False
      db.session.add(dash)
      db.session.commit()
  
      with self.assertRaises(SupersetSecurityException):
          security_manager.raise_for_access(dashboard=dash)
  
      db.session.delete(dash)
      db.session.commit()
  
imports: import json
  from unittest.mock import Mock, patch
  import pytest
  from flask import g
  from superset import db, security_manager
  from superset.connectors.sqla.models import SqlaTable
  from superset.daos.dashboard import EmbeddedDashboardDAO
  from superset.exceptions import SupersetSecurityException
  from superset.models.dashboard import Dashboard
  from superset.security.guest_token import GuestTokenResourceType
  from superset.sql_parse import Table
  from superset.utils.core import get_example_default_schema
  from superset.utils.database import get_example_database
  from tests.integration_tests.base_tests import SupersetTestCase
  from tests.integration_tests.fixtures.birth_names_dashboard import load_birth_names_dashboard_with_slices_class_scope, load_birth_names_data
  from tests.integration_tests.fixtures.world_bank_dashboard import load_world_bank_dashboard_with_slices, load_world_bank_dashboard_with_slices_class_scope, load_world_bank_data
label_desc: Use image node_id 10 for calling the TestGuestUserDashboardAccess obj's underlying member method code with example usage: obj.test_raise_for_access_dashboard_as_guest_no_rbac() without return types