• Shane Hathaway's avatar
    Because ZopeSecurityPolicy.checkPermission() used User.has_role(), it did · 958b76a4
    Shane Hathaway authored
    not behave as expected.  Permissions granted to Anonymous didn't
    necessarily get granted to other roles, for one thing.  This is an
    issue especially for the CMF.  User.allowed()
    is practically the same thing with the parameters reversed, so I changed
    checkPermission() to call User.allowed() instead.  We should be able to
    deprecate User.has_role() now.  I also implemented a minor (micro?)
    optimization by calling the aq_base module function instead of using getattr().
    958b76a4
ZopeSecurityPolicy.py 9.78 KB