Django-suit, add in Roles for specific classes site, slice, deployment, planetstack, change admin to leverage suit options
diff --git a/planetstack/core/models/planetstack.py b/planetstack/core/models/planetstack.py
new file mode 100644
index 0000000..9007a51
--- /dev/null
+++ b/planetstack/core/models/planetstack.py
@@ -0,0 +1,30 @@
+import os
+from django.db import models
+from core.models import PlCoreBase
+
+# Create your models here.
+
+class PlanetStack(PlCoreBase):
+ description = models.CharField(max_length=200, unique=True, default="PlanetStack", help_text="Used for scoping of roles at the PlanetStack Application level")
+
+ class Meta:
+ verbose_name_plural = "PlanetStack"
+ app_label = "core"
+
+ def __unicode__(self): return u'%s' % (self.description)
+
+class PlanetStackRole(PlCoreBase):
+ ROLE_CHOICES = (('admin','Admin'),)
+ role = models.CharField(choices=ROLE_CHOICES, unique=True, max_length=30)
+
+ def __unicode__(self): return u'%s' % (self.role)
+
+class PlanetStackPrivilege(PlCoreBase):
+ user = models.ForeignKey('User', related_name='planetstack_privileges')
+ planetstack = models.ForeignKey('PlanetStack', related_name='planetstack_privileges', default=1)
+ role = models.ForeignKey('PlanetStackRole')
+
+ def __unicode__(self): return u'%s %s %s' % (self.planetstack, self.user, self.role)
+
+
+