249 #self.assertEquals(rql, '') |
249 #self.assertEquals(rql, '') |
250 self.login('anon') |
250 self.login('anon') |
251 email = self.execute('Any X WHERE X eid %(x)s', {'x': email.eid}).get_entity(0, 0) |
251 email = self.execute('Any X WHERE X eid %(x)s', {'x': email.eid}).get_entity(0, 0) |
252 rql = email.cw_unrelated_rql('use_email', 'CWUser', 'object')[0] |
252 rql = email.cw_unrelated_rql('use_email', 'CWUser', 'object')[0] |
253 self.assertEquals(rql, 'Any S,AA,AB,AC,AD ORDERBY AA ' |
253 self.assertEquals(rql, 'Any S,AA,AB,AC,AD ORDERBY AA ' |
254 'WHERE NOT S use_email O, O eid %(x)s, S is CWUser, S login AA, S firstname AB, S surname AC, S modification_date AD, ' |
254 'WHERE NOT EXISTS(S use_email O), O eid %(x)s, S is CWUser, S login AA, S firstname AB, S surname AC, S modification_date AD, ' |
255 'A eid %(B)s, EXISTS(S identity A, NOT A in_group C, C name "guests", C is CWGroup)') |
255 'A eid %(B)s, EXISTS(S identity A, NOT A in_group C, C name "guests", C is CWGroup)') |
256 #rql = email.cw_unrelated_rql('use_email', 'Person', 'object')[0] |
256 #rql = email.cw_unrelated_rql('use_email', 'Person', 'object')[0] |
257 #self.assertEquals(rql, '') |
257 #self.assertEquals(rql, '') |
258 |
258 |
259 def test_unrelated_rql_security_nonexistant(self): |
259 def test_unrelated_rql_security_nonexistant(self): |