Wayne Witzel III
fd9d05d5df
fixing deprecated_team.organization credential migration
2016-08-30 14:21:16 -04:00
Wayne Witzel III
dbe3f628d4
ensure team organizations are assigned to credentials
2016-08-25 13:44:55 -04:00
Akita Noek
94052c2b2b
Fixed credential migration issue involving null inventory fields in job templates
...
Don't attempt to derive credential organization information from a job
template when the inventory field is null for that job template
#3107
2016-07-22 16:44:00 -04:00
Chris Meyers
e5b031e533
use existing logging infrastructure
2016-07-22 12:52:25 -04:00
Chris Meyers
fd098e64dc
log migration to standard tower log dir
2016-07-22 09:29:07 -04:00
Akita Noek
de9ae86ecc
Fix migration problems with inventoryless job templates
...
#3067
2016-07-21 10:35:43 -04:00
Akita Noek
353e6100b9
Fix team credential role access in rbac migration
2016-07-14 09:54:41 -04:00
Wayne Witzel III
87ffded774
renaming Credential.owner_role -> Credential.admin_role
2016-06-24 16:55:07 -04:00
Akita Noek
ee8215dc52
Removed InventoryGroup roles
2016-06-23 11:01:22 -04:00
Wayne Witzel III
4799b27108
ensure organization is empty when generating a new credential
2016-06-21 13:07:58 -04:00
Wayne Witzel III
e243c8319d
fix tests with refreshes
2016-06-10 13:41:22 -04:00
Wayne Witzel III
5754b4bb2c
adjusting Credential model and migrations
2016-06-10 13:23:32 -04:00
Akita Noek
c15db1eef6
Fixed up multi-org project migrations
2016-06-02 13:34:10 -04:00
Akita Noek
19dcc06c9d
Read permissions goes to read_role, not use_role
...
Dork.
2016-05-24 21:10:43 -04:00
Akita Noek
81f093b1c0
Opt to rebuild all roles in helper method
...
This code was fine for the 0009 migrations since we introduced all roles
at once, however with changes in 0017 we can't just patch from the
roots, so this works generically without having to get fancy about
identifying which roles we need to actually update.
2016-05-24 12:46:43 -04:00
Akita Noek
8aa4df1b78
Fix job template migrations again
...
Eliminated some incorrect wtf filtering in permissions, and fixed up the
credential access checks.
2016-05-24 12:45:22 -04:00
Akita Noek
5dbce56beb
When migrating, grant read_role instead of use_role appropriately
...
Only give read access to folks that didn't have explicit permissions to
use a project in a job template before.
2016-05-24 12:42:51 -04:00
Akita Noek
fd9c96aa80
Executed the inventory execute_role
...
Replaced with the 'use_role', which is now useful.
Completes #1959
2016-05-20 14:10:29 -04:00
Wayne Witzel III
6a6194cc43
update migrations for RBAC
2016-05-13 11:59:12 -04:00
Akita Noek
9d46a39e42
Added comment context to caught exception
2016-05-12 16:31:32 -04:00
Akita Noek
27457239bc
Fixed up job template migrations
...
Massive speed improvement as well as made it not wrong (or at least less wrong).
2016-05-12 13:43:36 -04:00
Akita Noek
be8a1f4859
Another orgfunc migration fix
2016-05-12 13:43:36 -04:00
Akita Noek
83a30f57f5
Fixed JobTemplate migration when inventory is NULL
...
JobTemplate.inventory can be NULL if the inventory was deleted.
2016-05-03 15:56:02 -04:00
Akita Noek
c7f2568c10
Fixed up some credential migration issues
2016-05-02 14:44:15 -04:00
Akita Noek
58e9c4ef87
Fixed JT migration issue
...
Role.__contains__ is not defined here, so we needed to drop in the
implementation instead.
2016-05-02 11:14:31 -04:00
Akita Noek
ac1503e55c
Fixed org migrations.. users are 'members' not 'auditors'
2016-04-28 11:50:36 -04:00
Akita Noek
27a7cf0d88
Added an explicit save everything step in the rbac migration
...
This step ensures all of our roles get setup before we start the
migration. It also speeds things up a little as we can wrap everything
with a `with batch_role_ancestor_rebuilding()`. We were pretty much
doing this already, but we had an issue where we didn't catch all job
templates all the time, so this just makes it very explicit and ensures
everything is setup, and does so a little faster.
2016-04-28 10:37:15 -04:00
Akita Noek
c9501ad556
commented out code cleanup
2016-04-28 09:39:18 -04:00
Akita Noek
af4daec314
More RBAC migration fixes
2016-04-27 16:59:33 -04:00
Akita Noek
b670681f6c
Handle JT "create" permissions during migration
2016-04-27 15:28:17 -04:00
Akita Noek
280993a15d
Dropped stored role name/description and other superflous fields
...
For name and description, we'll derive these from the role_field and
content type, which is much better for lots of reasons (eg changing text
the future). Also ditched the rest of the fields comming from the
standard common base model, we didn't use them and they cost several
indexes on the table.
2016-04-22 10:16:04 -04:00
Akita Noek
c440aefd85
fix jt tests
2016-04-15 16:08:14 -04:00
Wayne Witzel III
d9538b200a
fix User.accessible_objects
2016-04-15 14:57:01 -04:00
Wayne Witzel III
d508254742
updater_role -> update_role
2016-04-15 11:01:35 -04:00
Wayne Witzel III
7098ef8da5
usage_role -> use_role
2016-04-15 11:01:08 -04:00
Wayne Witzel III
5bca1283b2
executor_role -> execute_role
2016-04-15 11:00:33 -04:00
Akita Noek
74d86859f1
Fix project migration when project has exactly one org
2016-04-12 11:40:17 -04:00
Akita Noek
5f8e7bbf55
Replace user.admin_role usage with manual version that works in migrations
2016-04-12 11:40:17 -04:00
Akita Noek
86e29221d5
Fixed missing orgfunc usage to resolve organization during credential migration
2016-04-12 11:40:17 -04:00
Akita Noek
e3a45235a6
Do an initial save on all resources during amigration to force the creation of RBAC role objects.
2016-04-12 11:40:17 -04:00
Akita Noek
7d2e660749
Make use of 'current' apps so RBAC ImplicitRoleField can work during migrations
...
While a migration is taking place, we can't juse use normal model
references like Role and RolePermission, nor can we use generic foreign
keys without manually referring to the content type and object id
fields.
2016-04-12 11:40:17 -04:00
Akita Noek
274744b4c1
Replaced Role.singleton usage in migrations as it doesn't exist here apparently
2016-04-12 11:40:17 -04:00
Akita Noek
ec439126e0
Added created/modified and another content_object fix in our migrations
...
#1380 #1425
2016-04-12 11:40:17 -04:00
Akita Noek
b1c568e4d9
Fix invalid usage of content_object during migrations
...
#1380
#1425
2016-04-12 11:40:17 -04:00
Akita Noek
28acc9516d
Hopefully fix ContentType problem hit during 2.4 -> 3.0 upgrade migration
...
#1380
2016-04-01 15:20:18 -04:00
Wayne Witzel III
d7a81c62d3
fixup inventory migration from PR feedback
2016-04-01 09:21:45 -04:00
Wayne Witzel III
1d2d043c29
fixes:#1371 - migration log write permissions
2016-04-01 09:06:40 -04:00
Wayne Witzel III
ed17be242d
more unicode fixes
2016-03-31 14:20:16 -04:00
Wayne Witzel III
24e20abb1b
more unicode safety
2016-03-31 11:20:19 -04:00
Wayne Witzel III
e84008fe51
use len instead of count to take advantage of cache
2016-03-31 09:58:05 -04:00