Skip to content

Commit

Permalink
Updated logs for superuser changes
Browse files Browse the repository at this point in the history
  • Loading branch information
daystram committed Jan 25, 2021
1 parent 15cc44d commit 85214c3
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions ratify-fe/src/views/manage/Log.vue
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,23 @@ export default Vue.extend({
date: date
});
break;
case "user::superuser":
this.logs.push({
color: ({ I: "success", W: "error" } as LogSeverityMap)[
logs[i].severity
],
icon: "mdi-account-supervisor-circle",
title: ({
I: "Promoted to Admin",
W: "Demoted from Admin"
} as LogSeverityMap)[logs[i].severity],
subtitle: ({
I: `${desc?.detail?.preferred_username} promoted to admin by ${logs[i].preferred_username}`,
W: `${desc?.detail?.preferred_username} demoted from admin by ${logs[i].preferred_username}`
} as LogSeverityMap)[logs[i].severity],
date: date
});
break;
}
}
/* eslint-enable @typescript-eslint/camelcase */
Expand Down

0 comments on commit 85214c3

Please sign in to comment.