Ejemplo n.º 1
0
 def can_view_consumer(self):
     # To view the consumer pages, the user must satisfy either criterion:
     #   * Have submitted an app.
     #   * Is a vouched Mozillian or whitelisted fella.
     return self.is_app_developer or AccessWhitelist.matches(self.email)
Ejemplo n.º 2
0
 def matches(email, expected):
     return eq_(AccessWhitelist.matches(email), expected)
Ejemplo n.º 3
0
 def can_view_consumer(self):
     # To view the consumer pages, the user must satisfy either criterion:
     #   * Have submitted an app.
     #   * Is a vouched Mozillian or whitelisted fella.
     return self.is_app_developer or AccessWhitelist.matches(self.email)
Ejemplo n.º 4
0
 def test_empty(self):
     for value in ['', ' ']:
         AccessWhitelist.objects.all().delete()
         AccessWhitelist.objects.create(email=value)
         eq_(AccessWhitelist.matches('*****@*****.**'), False)