Complete the removal of cycle support in RBAC

We removed the actual need for this when we broke the org<->team cycle.
This patch removes the code we had to support that, but since it's
costly and unused, it's now nixxed.
This commit is contained in:
Akita Noek
2016-04-19 22:10:47 -04:00
parent 70148dc2f3
commit 0434712dc9
2 changed files with 0 additions and 104 deletions

View File

@@ -226,19 +226,10 @@ class Role(CommonModelNameNotUnique):
'roles_table': Role._meta.db_table,
}
def split_ids_for_sqlite(role_ids):
for i in xrange(0, len(role_ids), 999):
yield role_ids[i:i + 999]
for ids in split_ids_for_sqlite(role_ids_to_rebuild):
sql_params['ids'] = ','.join(str(x) for x in ids)
cursor.execute('''
DELETE FROM %(ancestors_table)s
WHERE ancestor_id IN (%(ids)s)
''' % sql_params)
while role_ids_to_rebuild:
if loop_ct > 1000:
raise Exception('Ancestry role rebuilding error: infinite loop detected')
@@ -372,4 +363,3 @@ def get_roles_on_resource(resource, accessor):
object_id=resource.id
).values_list('role_field', flat=True)
}