mirror of
https://github.com/SecurityBrewery/catalyst.git
synced 2025-12-08 16:22:46 +01:00
@@ -5,7 +5,7 @@
|
||||
<v-form ref="form" v-model="valid" @submit.prevent="login">
|
||||
<v-card class="pa-4">
|
||||
<div class="d-flex justify-center">
|
||||
<v-img src="/ui/flask.svg" height="100" width="100" class="flex-grow-0"></v-img>
|
||||
<v-img src="/ui/static/flask.svg" height="100" width="100" class="flex-grow-0"></v-img>
|
||||
</div>
|
||||
<v-card-title class="text-center justify-center">
|
||||
Catalyst Login
|
||||
@@ -45,7 +45,7 @@
|
||||
<v-list>
|
||||
<v-list-item class="px-2" :to="{ name: 'Home' }">
|
||||
<v-list-item-avatar rounded="0">
|
||||
<v-img src="/ui/flask_white.svg" :width="40"></v-img>
|
||||
<v-img src="/ui/static/flask_white.svg" :width="40"></v-img>
|
||||
</v-list-item-avatar>
|
||||
<v-list-item-content>
|
||||
<v-list-item-title class="title">
|
||||
@@ -208,16 +208,16 @@ export default Vue.extend({
|
||||
valid: true,
|
||||
authenticated: false,
|
||||
settings: [
|
||||
{ icon: "mdi-format-list-bulleted-type", name: "Ticket Types", to: "TicketTypeList", role: "engineer:tickettype:write" },
|
||||
{ icon: "mdi-file-hidden", name: "Templates", to: "TemplateList", role: "analyst:template:read" },
|
||||
{ icon: "mdi-file-cog-outline", name: "Playbooks", to: "PlaybookList", role: "analyst:playbook:read" },
|
||||
{ icon: "mdi-flash", name: "Automations", to: "AutomationList", role: "analyst:automation:read" },
|
||||
{ icon: "mdi-filter", name: "Ingestion Rules", to: "RuleList", role: "analyst:rule:read", tier: "enterprise" },
|
||||
{ icon: "mdi-account", name: "Users & API Keys", to: "UserList", role: "admin:user:write" },
|
||||
{ icon: "mdi-account-group", name: "Groups", to: "GroupList", role: "admin:group:write", tier: "enterprise" },
|
||||
{ icon: "mdi-cogs", name: "User Data", to: "UserDataList", role: "admin:userdata:write" },
|
||||
{ icon: "mdi-format-list-checks", name: "Jobs", to: "JobList", role: "admin:job:write" },
|
||||
{ icon: "mdi-cog", name: "Settings", to: "Settings", role: "admin:settings:write" },
|
||||
{ icon: "mdi-format-list-bulleted-type", name: "Ticket Types", to: "TicketTypeList", role: "tickettype:write" },
|
||||
{ icon: "mdi-file-hidden", name: "Templates", to: "TemplateList", role: "template:read" },
|
||||
{ icon: "mdi-file-cog-outline", name: "Playbooks", to: "PlaybookList", role: "playbook:read" },
|
||||
{ icon: "mdi-flash", name: "Automations", to: "AutomationList", role: "automation:read" },
|
||||
{ icon: "mdi-filter", name: "Ingestion Rules", to: "RuleList", role: "rule:read", tier: "enterprise" },
|
||||
{ icon: "mdi-account", name: "Users & API Keys", to: "UserList", role: "user:write" },
|
||||
{ icon: "mdi-account-group", name: "Groups", to: "GroupList", role: "group:write", tier: "enterprise" },
|
||||
{ icon: "mdi-cogs", name: "User Data", to: "UserDataList", role: "userdata:write" },
|
||||
{ icon: "mdi-format-list-checks", name: "Jobs", to: "JobList", role: "job:write" },
|
||||
{ icon: "mdi-cog", name: "Settings", to: "Settings", role: "settings:write" },
|
||||
],
|
||||
mini: true,
|
||||
goto: "",
|
||||
@@ -235,7 +235,7 @@ export default Vue.extend({
|
||||
},
|
||||
internal: function (): Array<any> {
|
||||
return [
|
||||
{ icon: "mdi-view-dashboard", name: "Dashboards", to: "DashboardList", role: "analyst:dashboard:read" },
|
||||
{ icon: "mdi-view-dashboard", name: "Dashboards", to: "DashboardList", role: "dashboard:read" },
|
||||
{ icon: "mdi-check-bold", name: "Open Tasks", to: "TaskList", count: this.$store.state.task_count },
|
||||
]
|
||||
},
|
||||
@@ -280,8 +280,8 @@ export default Vue.extend({
|
||||
this.$router.push({ name: "TicketList", params: { type: type } });
|
||||
},
|
||||
hasRole: function (s: string) {
|
||||
if (this.$store.state.user.roles) {
|
||||
return this.lodash.includes(this.$store.state.user.roles, s);
|
||||
if (this.$store.state.settings.roles) {
|
||||
return this.lodash.includes(this.$store.state.settings.roles, s);
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
||||
@@ -151,8 +151,8 @@ export default Vue.extend({
|
||||
return DateTime.fromISO(s).toFormat(format);
|
||||
},
|
||||
hasRole: function (s: string): boolean {
|
||||
if (this.$store.state.user.roles) {
|
||||
return this.lodash.includes(this.$store.state.user.roles, s);
|
||||
if (this.$store.state.settings.roles) {
|
||||
return this.lodash.includes(this.$store.state.settings.roles, s);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -41,8 +41,8 @@ export default Vue.extend({
|
||||
return true;
|
||||
}
|
||||
let has = false;
|
||||
if (this.$store.state.user.roles) {
|
||||
this.lodash.forEach(this.$store.state.user.roles, (userRole) => {
|
||||
if (this.$store.state.settings.roles) {
|
||||
this.lodash.forEach(this.$store.state.settings.roles, (userRole) => {
|
||||
if (link.role === userRole || this.lodash.startsWith(link.role, userRole + ":")) {
|
||||
has = true;
|
||||
}
|
||||
|
||||
@@ -119,8 +119,8 @@ export default Vue.extend({
|
||||
this.dialog = false;
|
||||
},
|
||||
hasRole: function (s: string): boolean {
|
||||
if (this.$store.state.user.roles) {
|
||||
return this.lodash.includes(this.$store.state.user.roles, s);
|
||||
if (this.$store.state.settings.roles) {
|
||||
return this.lodash.includes(this.$store.state.settings.roles, s);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ export default Vue.extend({
|
||||
},
|
||||
computed: {
|
||||
readonly: function (): boolean {
|
||||
return !this.hasRole("engineer:automation:write");
|
||||
return !this.hasRole("automation:write");
|
||||
},
|
||||
types: function (): Array<string> {
|
||||
return [ AutomationResponseTypeEnum.Global, AutomationResponseTypeEnum.Playbook, AutomationResponseTypeEnum.Artifact ]
|
||||
@@ -104,8 +104,8 @@ export default Vue.extend({
|
||||
}
|
||||
},
|
||||
hasRole: function (s: string): boolean {
|
||||
if (this.$store.state.user.roles) {
|
||||
return this.lodash.includes(this.$store.state.user.roles, s);
|
||||
if (this.$store.state.settings.roles) {
|
||||
return this.lodash.includes(this.$store.state.settings.roles, s);
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
itemname="id"
|
||||
singular="Automation"
|
||||
plural="Automations"
|
||||
writepermission="engineer:automation:write"
|
||||
writepermission="automation:write"
|
||||
@delete="deleteAutomation"
|
||||
></List>
|
||||
</v-main>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
itemname="name"
|
||||
singular="Dashboard"
|
||||
plural="Dashboards"
|
||||
writepermission="admin:dashboard:write"
|
||||
writepermission="dashboard:write"
|
||||
@delete="deleteDashboard"
|
||||
></List>
|
||||
</v-main>
|
||||
|
||||
@@ -94,7 +94,7 @@ export default Vue.extend({
|
||||
},
|
||||
computed: {
|
||||
readonly: function (): boolean {
|
||||
return !this.hasRole("admin:job:write");
|
||||
return !this.hasRole("job:write");
|
||||
},
|
||||
globalautomations: function (): Array<AutomationResponse> {
|
||||
if (!this.automations) {
|
||||
@@ -157,8 +157,8 @@ export default Vue.extend({
|
||||
});
|
||||
},
|
||||
hasRole: function (s: string): boolean {
|
||||
if (this.$store.state.user.roles) {
|
||||
return this.lodash.includes(this.$store.state.user.roles, s);
|
||||
if (this.$store.state.settings.roles) {
|
||||
return this.lodash.includes(this.$store.state.settings.roles, s);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ export default Vue.extend({
|
||||
}),
|
||||
computed: {
|
||||
canWrite: function (): boolean {
|
||||
return this.hasRole("admin:job:write");
|
||||
return this.hasRole("job:write");
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
@@ -80,8 +80,8 @@ export default Vue.extend({
|
||||
});
|
||||
},
|
||||
hasRole: function (s: string): boolean {
|
||||
if (this.$store.state.user.roles) {
|
||||
return this.lodash.includes(this.$store.state.user.roles, s);
|
||||
if (this.$store.state.settings.roles) {
|
||||
return this.lodash.includes(this.$store.state.settings.roles, s);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@ export default Vue.extend({
|
||||
}
|
||||
},
|
||||
readonly: function (): boolean {
|
||||
return !this.hasRole("engineer:playbook:write");
|
||||
return !this.hasRole("playbook:write");
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
@@ -286,8 +286,8 @@ export default Vue.extend({
|
||||
}
|
||||
},
|
||||
hasRole: function (s: string): boolean {
|
||||
if (this.$store.state.user.roles) {
|
||||
return this.lodash.includes(this.$store.state.user.roles, s);
|
||||
if (this.$store.state.settings.roles) {
|
||||
return this.lodash.includes(this.$store.state.settings.roles, s);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
singular="Playbook"
|
||||
plural="Playbooks"
|
||||
@delete="deletePlaybook"
|
||||
writepermission="engineer:playbook:write"
|
||||
writepermission="playbook:write"
|
||||
></List>
|
||||
</v-main>
|
||||
</template>
|
||||
|
||||
@@ -47,7 +47,7 @@ export default Vue.extend({
|
||||
},
|
||||
computed: {
|
||||
readonly: function (): boolean {
|
||||
return !this.hasRole("engineer:template:write");
|
||||
return !this.hasRole("template:write");
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
@@ -81,8 +81,8 @@ export default Vue.extend({
|
||||
}
|
||||
},
|
||||
hasRole: function (s: string): boolean {
|
||||
if (this.$store.state.user.roles) {
|
||||
return this.lodash.includes(this.$store.state.user.roles, s);
|
||||
if (this.$store.state.settings.roles) {
|
||||
return this.lodash.includes(this.$store.state.settings.roles, s);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
itemname="name"
|
||||
singular="Template"
|
||||
plural="Templates"
|
||||
writepermission="engineer:template:write"
|
||||
writepermission="template:write"
|
||||
@delete="deleteTemplate"
|
||||
></List>
|
||||
</v-main>
|
||||
|
||||
@@ -761,7 +761,7 @@
|
||||
<div style="display: flex; align-items: center" class="pb-1">
|
||||
<span class="text--disabled">Files</span>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn v-if="hasRole('analyst:file')" small icon @click="fileDialog = true">
|
||||
<v-btn v-if="hasRole('file')" small icon @click="fileDialog = true">
|
||||
<v-icon>mdi-plus</v-icon>
|
||||
</v-btn>
|
||||
</div>
|
||||
@@ -1017,8 +1017,8 @@ export default Vue.extend({
|
||||
},
|
||||
methods: {
|
||||
hasRole: function (s: string) {
|
||||
if (this.$store.state.user.roles) {
|
||||
return this.lodash.includes(this.$store.state.user.roles, s);
|
||||
if (this.$store.state.settings.roles) {
|
||||
return this.lodash.includes(this.$store.state.settings.roles, s);
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
singular="Ticket Type"
|
||||
plural="Ticket Types"
|
||||
@delete="deleteTicketType"
|
||||
writepermission="engineer:tickettype:write"
|
||||
writepermission="tickettype:write"
|
||||
></List>
|
||||
</v-main>
|
||||
</template>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
plural="User Data"
|
||||
:show-new="false"
|
||||
:deletable="false"
|
||||
writepermission="admin:userdata:write"
|
||||
writepermission="userdata:write"
|
||||
></List>
|
||||
</v-main>
|
||||
</template>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
singular="User / API Key"
|
||||
plural="Users / API Keys"
|
||||
@delete="deleteUser"
|
||||
writepermission="admin:user:write"
|
||||
writepermission="user:write"
|
||||
></List>
|
||||
</v-main>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user