Show environment role name in audit log

This commit is contained in:
Patrick Smith
2018-12-18 11:16:02 -05:00
parent c5f878df24
commit a63df5083d
2 changed files with 11 additions and 0 deletions

View File

@@ -33,11 +33,16 @@ class EnvironmentRole(Base, mixins.TimestampsMixin, mixins.AuditableMixin):
def history(self):
return self.get_changes()
@property
def displayname(self):
return self.role
@property
def event_details(self):
return {
"updated_user_name": self.user.displayname,
"updated_user_id": str(self.user_id),
"role": self.role,
"environment": self.environment.displayname,
"environment_id": str(self.environment_id),
"project": self.environment.project.name,