mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2025-07-22 20:41:40 +02:00
Add 'project' to user table, add 'manager' role, conditional web render
- Addresses issues #40 #45 #82 - Reworked Navigation Header for all roles - 'Manager' role added, can be assigned a project-id in config by admins - BREAKING! -> Added 'project' column in SQLite3 table 'user' - Manager-Assigned project will be added to all graphql filters: Only show Jobs and Users of given project - 'My Jobs' Tab for all Roles - Switched from Bool "isAdmin" to integer authLevels - Removed critical data frontend logging - Reworked repo.query.SecurityCheck()
This commit is contained in:
@@ -16,7 +16,8 @@
|
||||
<script>
|
||||
const header = {
|
||||
"username": "{{ .User.Username }}",
|
||||
"isAdmin": {{ .User.IsAdmin }},
|
||||
"project": "{{ .User.Project }}",
|
||||
"authlevel": {{ .User.AuthLevel }},
|
||||
"clusters": {{ .Clusters }},
|
||||
};
|
||||
</script>
|
||||
|
@@ -9,14 +9,14 @@
|
||||
<th>Running Jobs (short ones not listed)</th>
|
||||
<th>Total Jobs</th>
|
||||
<th>Short Jobs in past 24h</th>
|
||||
{{if .User.IsAdmin}}
|
||||
{{if ge .User.AuthLevel 4}}
|
||||
<th>System View</th>
|
||||
<th>Analysis View</th>
|
||||
{{end}}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{if .User.IsAdmin}}
|
||||
{{if ge .User.AuthLevel 4}}
|
||||
{{range .Infos.clusters}}
|
||||
<tr>
|
||||
<td>{{.Name}}</td>
|
||||
|
@@ -10,6 +10,8 @@
|
||||
<script>
|
||||
const filterPresets = {{ .FilterPresets }};
|
||||
const clusterCockpitConfig = {{ .Config }};
|
||||
const project = {{ .User.Project }};
|
||||
const isManager = {{ eq .User.AuthLevel 3 }};
|
||||
</script>
|
||||
<script src='/build/jobs.js'></script>
|
||||
{{end}}
|
||||
|
@@ -10,6 +10,8 @@
|
||||
const listType = {{ .Infos.listType }};
|
||||
const filterPresets = {{ .FilterPresets }};
|
||||
const clusterCockpitConfig = {{ .Config }};
|
||||
const project = {{ .User.Project }};
|
||||
const isManager = {{ eq .User.AuthLevel 3 }};
|
||||
</script>
|
||||
<script src='/build/list.js'></script>
|
||||
{{end}}
|
||||
|
Reference in New Issue
Block a user