def test_default_acls(self):
        """Test that a user can create a new entity"""
        self.user1.global_role = roles.Role.WRITER
        self.user1.save()

        rbac.Group(name="All users").save()

        response = client.post(
            "/api/v2/entities",
            json={"entity": {"name": "test", "type": "malware"}},
            headers={"Authorization": f"Bearer {self.user1_token}"},
        )
        data = response.json()
        self.assertEqual(response.status_code, 200, data)

        test_malware = entity.Malware.find(name="test")
        test_malware.get_acls()
        self.assertCountEqual(test_malware.acls.keys(), ["All users", "user1"])
Test that a user can create a new entity
tests/apiv2/rbac.py