Skip to content

Commit

Permalink
feat: remove empty span and hide admin block if only geoserver admin
Browse files Browse the repository at this point in the history
  • Loading branch information
f-necas committed Jan 15, 2024
1 parent ea23014 commit 0c15a16
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion src/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export function getAdminRoles(roles: KNOWN_ROLES[]): AdminRoles | null {
const catalog = superUser || roles.indexOf('ROLE_GN_ADMIN') > -1
const viewer = superUser || roles.indexOf('ROLE_MAPSTORE_ADMIN') > -1
const admin =
console || catalog || viewer || roles.indexOf('ROLE_ADMINISTRATOR') > -1
superUser || console || catalog || viewer
if (!admin) return null
return {
superUser,
Expand Down
1 change: 0 additions & 1 deletion src/header.ce.vue
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ onMounted(() => {
>
<span class="text-gray-400" v-if="isAdmin">|</span>
<div class="admin group inline-block relative" v-if="isAdmin">
<span></span>
<button class="nav-item after:hover:scale-x-0 flex items-center">
<span class="mr-2 first-letter:capitalize">{{ t('admin') }}</span>
<ChevronDownIcon
Expand Down

0 comments on commit 0c15a16

Please sign in to comment.