Skip to content
This repository has been archived by the owner on Jun 19, 2020. It is now read-only.

Default Permission.implies method in core/authz/authz.py #25

Open
lhmatt opened this issue Oct 1, 2018 · 2 comments
Open

Default Permission.implies method in core/authz/authz.py #25

lhmatt opened this issue Oct 1, 2018 · 2 comments

Comments

@lhmatt
Copy link

lhmatt commented Oct 1, 2018

Line 123-125:

if self.targets != {self.WILDCARD_TOKEN}:
            if not self.actions >= permission.actions:
                return False

This appears to be a copy+paste error. Line 124 is evaluating the actions part of the permission instead of the targets part. This causes permission checks to fail. Modifying it to evaluate self.targets seems to fix everything.

@Dowwie
Copy link
Contributor

Dowwie commented Oct 12, 2018

Good catch. Would you mind submitting a PR for this?

@lhmatt
Copy link
Author

lhmatt commented Oct 15, 2018

A proper patch should include fixing whatever tests allowed this to slip through. I'm afraid I don't have time to setup the test suite and comb through them.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants