Akita Noek
34067d9c0e
Project migration and tests
2016-02-08 22:54:19 -05:00
Akita Noek
d51447e158
Migration and tests for super users
2016-02-08 22:54:19 -05:00
Akita Noek
5008e3faf5
Add parent System roles to organization roles
2016-02-08 22:54:19 -05:00
Akita Noek
f7dc3c0f0d
Added an explicit member role, distinct from auditor role
2016-02-08 22:54:19 -05:00
Akita Noek
70229076d2
Removed unnecessary ResourceHierarchy model
2016-02-05 17:03:59 -05:00
Akita Noek
fe29486d7b
Removed unnecessary save()
2016-02-05 17:01:19 -05:00
Akita Noek
619e5797d4
RBAC inventory migration tests
2016-02-05 16:59:38 -05:00
Akita Noek
d5740408e9
Addd inventory fixture
2016-02-05 16:59:22 -05:00
Akita Noek
9f33835582
Added RBAC migration code
2016-02-05 16:58:41 -05:00
Akita Noek
332b8b3b49
Added Role.is_ancestor_of predicate
2016-02-05 16:58:16 -05:00
Akita Noek
4540eb0079
Updated role hierarchy cache rebuilder to handle adds to .children as well as .parents
2016-02-05 16:46:00 -05:00
Akita Noek
c6b2e509fd
Fixed ImplicitRoleField and ImplicitResourceField's from being too lazy
...
This ensures that the role and resource fields get created and bound
automatically without having to explicitly access them a first time.
2016-02-04 15:12:25 -05:00
Akita Noek
1035a6737e
Added singleton role support method and parent_role auto-binder in the ImplicitRoleField
...
Also fixed bug in the single object permission lookup.
2016-02-04 15:12:25 -05:00
Akita Noek
4d080497cc
Updated inventory role/resource model to better match the spec
2016-02-04 15:12:25 -05:00
Akita Noek
1cd8f6f46a
Moved m2m signal handler out to our common signals.py
2016-02-04 15:12:25 -05:00
Akita Noek
74163d3711
Added Role.grant method for convenient permission granting
2016-02-04 15:12:25 -05:00
Akita Noek
cf298f6803
Single permission query optimization
2016-02-04 15:12:25 -05:00
Akita Noek
5b50ebb8da
Added a ResourceMixin to be added to any model that is a "Resource"
...
Also added initial permissions checking and accessible object methods to
the mixin
2016-02-04 15:12:25 -05:00
Akita Noek
6dad0406b8
Initial implicit role / resource field additions into models
...
"Completes" #731 until we find out what I missed
2016-02-04 15:12:24 -05:00
Akita Noek
68d8299689
Switched from booleans to integers for permissions flags
...
This is so that our permissions aggregation query can use MAX(column)
which exists and works in both postgres and sqlite, as opposed to having
some conditional aggregate function that we use depending on our
backend.
2016-02-04 15:12:24 -05:00
Akita Noek
014b970030
Automatically rebuild our role hierarchy when our m2m map is updated
2016-02-04 15:12:24 -05:00
Akita Noek
fae9ef3d65
flake8 corrections
2016-02-04 15:12:24 -05:00
Akita Noek
00619b7e36
Initial RBAC field and model definitions
2016-02-04 15:12:24 -05:00
Akita Noek
39d84c3cda
5% performance boost on make test
...
Calling `.after` on a dateutil.rrule object that has an UNTIL clause
performs very poorly if the interval is low and the start time is a long
time ago. This patch replaces two test cases where we were using a
minute interval with a fixed start time of (currently) 2 years ago,
which resulted in aproximately 40s of execution time to simply evaluate
`.after(now())`. Replacing these two tests with tests that start from
"yesterday" while keeping the same INTERVAL and UNTIL settings
eliminates this unnecessary slowdown while maintaining the spirit of the
original tests.
2016-01-25 09:37:59 -05:00
Akita Noek
1e1a023d19
Obey no_log with ansible 2.0
...
Fixes #645
2016-01-20 15:11:49 -05:00