Add Role.display_name

This commit is contained in:
richard-dds
2018-09-24 14:10:55 -04:00
parent 7250e1167c
commit e64b2dd034
6 changed files with 79 additions and 2 deletions

View File

@@ -10,6 +10,7 @@ class Role(Base, mixins.TimestampsMixin):
id = types.Id()
name = Column(String, index=True, unique=True, nullable=False)
display_name = Column(String, nullable=False)
description = Column(String, nullable=False)
permissions = Column(ARRAY(String), index=True, server_default="{}", nullable=False)

View File

@@ -36,6 +36,10 @@ class WorkspaceUser(object):
def role(self):
return self.workspace_role.role.name
@property
def role_displayname(self):
return self.workspace_role.role.display_name
@property
def status(self):
return "active"