Eliminate multiple-organization projects

Projects are duplicated with this migration to provide a nearly
equivalent functionality.

Satisifies #1164
This commit is contained in:
Akita Noek
2016-03-14 14:57:24 -04:00
parent 10646a448a
commit ba6752fb23
7 changed files with 175 additions and 25 deletions

View File

@@ -198,6 +198,13 @@ class Project(UnifiedJobTemplate, ProjectOptions, ResourceMixin):
app_label = 'main'
ordering = ('id',)
organization = models.ForeignKey(
'Organization',
blank=True,
null=True,
on_delete=models.CASCADE,
related_name='projects',
)
scm_delete_on_next_update = models.BooleanField(
default=False,
editable=False,
@@ -212,13 +219,13 @@ class Project(UnifiedJobTemplate, ProjectOptions, ResourceMixin):
admin_role = ImplicitRoleField(
role_name='Project Administrator',
role_description='May manage this project',
parent_role='organizations.admin_role',
parent_role='organization.admin_role',
permissions = {'all': True}
)
auditor_role = ImplicitRoleField(
role_name='Project Auditor',
role_description='May read all settings associated with this project',
parent_role='organizations.auditor_role',
parent_role='organization.auditor_role',
permissions = {'read': True}
)
member_role = ImplicitRoleField(