Add link to sudo powers
This commit is contained in:
parent
ec8b7b7db9
commit
9f20eda00d
5 changed files with 20 additions and 1 deletions
1
html/template/svg/god.svg
Normal file
1
html/template/svg/god.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 5.7 KiB |
|
|
@ -143,6 +143,19 @@
|
|||
<span class="menu-text ms-2">Help</span>
|
||||
</a>
|
||||
</li>
|
||||
{{ if eq .Role "root" }}
|
||||
<li>
|
||||
<a
|
||||
href="/sudo"
|
||||
data-bs-toggle="tooltip"
|
||||
data-bs-placement="right"
|
||||
title="Sudo"
|
||||
>
|
||||
<div class="menu-icon">{{ template "god.svg" }}</div>
|
||||
<span class="menu-text ms-2">Sudo</span>
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
|
|
|||
|
|
@ -83,7 +83,10 @@
|
|||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.sidebar-menu .menu-icon svg {
|
||||
width: 1em;
|
||||
height: 1em;
|
||||
}
|
||||
.sidebar-menu .menu-text {
|
||||
transition: opacity 0.3s;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -85,5 +85,6 @@ type User struct {
|
|||
Initials string
|
||||
Notifications []notification.Notification
|
||||
Organization Organization
|
||||
Role string
|
||||
Username string
|
||||
}
|
||||
|
|
|
|||
|
|
@ -106,6 +106,7 @@ func contentForUser(ctx context.Context, user *models.User) (User, error) {
|
|||
Initials: extractInitials(user.DisplayName),
|
||||
Notifications: notifications,
|
||||
Organization: organization,
|
||||
Role: user.Role.String(),
|
||||
Username: user.Username,
|
||||
}, nil
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue