[WIP] invited user now has comma separated permission values

stored against it so that user can be created with correct
permissions.
This commit is contained in:
Adam Shimali
2016-02-29 09:49:12 +00:00
parent 6f786143c8
commit 59aec1939c
7 changed files with 47 additions and 5 deletions

View File

@@ -264,6 +264,12 @@ class InvitedUser(db.Model):
default=datetime.datetime.now)
status = db.Column(
db.Enum(*INVITED_USER_STATUS_TYPES, name='invited_users_status_types'), nullable=False, default='pending')
permissions = db.Column(db.String, nullable=False)
# would like to have used properties for this but haven't found a way to make them
# play nice with marshmallow yet
def get_permissions(self):
return self.permissions.split(',')
class Permission(db.Model):