Hi,

I'm doing some tests writing for an project of mine and come to testing
permissions. I use DummySecurityPolicy in most of my tests to speedup
testing. But there is a small problem with the code.

DummySecurityPolicy.principals_allowed_by_permission() returns always
the result of DummySecurityPolicy.effective_principals() regardless if
permissive is True or False.

It should return [] if permissive is set to False.

So the code should look like this.

    def principals_allowed_by_permission(self, context, permission):
        if self.permissive:
            return self.effective_principals(None)
        else:
            return []

Regards
   Estartu

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pylons-discuss/46c5336e-ef8c-1ecc-d1c6-e900a461d545%40augusta.de.
For more options, visit https://groups.google.com/d/optout.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to