Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 968f59edc5 | |||
| 7001687194 | |||
| 4b51a3cc05 | |||
| 3b3683c791 | |||
| 79bd47266a | |||
| 8aa54c187b |
+1
-1
@@ -1,2 +1,2 @@
|
|||||||
parameters:
|
parameters:
|
||||||
app.version: '0.4.50'
|
app.version: '0.4.53'
|
||||||
|
|||||||
@@ -60,13 +60,16 @@ const { sections } = useSidebar()
|
|||||||
|
|
||||||
const isEmployee = computed(() => Boolean(auth.user?.isEmployee))
|
const isEmployee = computed(() => Boolean(auth.user?.isEmployee))
|
||||||
|
|
||||||
const isMailVisible = computed(() => {
|
const { can } = usePermissions()
|
||||||
const roles: string[] = auth.user?.roles ?? []
|
|
||||||
return roles.includes('ROLE_USER') || roles.includes('ROLE_ADMIN')
|
// L'onglet Messagerie est rendu côté layout (hors sidebar backend) : il faut donc
|
||||||
})
|
// reproduire ici le gate de permission. ROLE_ADMIN bypasse via can().
|
||||||
|
const isMailVisible = computed(() => can('mail.access'))
|
||||||
|
|
||||||
const { enabled: shareEnabled, ensureLoaded: ensureShareStatus } = useShareStatus()
|
const { enabled: shareEnabled, ensureLoaded: ensureShareStatus } = useShareStatus()
|
||||||
const isDocumentsVisible = computed(() => shareEnabled.value === true)
|
// Documents = explorateur de partage : visible si le module est actif ET la
|
||||||
|
// permission d'accès au partage est accordée (alignement avec le middleware de page).
|
||||||
|
const isDocumentsVisible = computed(() => shareEnabled.value === true && can('integration.share.access'))
|
||||||
|
|
||||||
const currentProjectId = computed(() => {
|
const currentProjectId = computed(() => {
|
||||||
const match = route.path.match(/^\/projects\/(\d+)/)
|
const match = route.path.match(/^\/projects\/(\d+)/)
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ const { t } = useI18n()
|
|||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
|
|
||||||
|
definePageMeta({ middleware: ['permission'], permission: 'mail.access' })
|
||||||
useHead({ title: t('mail.title') })
|
useHead({ title: t('mail.title') })
|
||||||
|
|
||||||
// ─── Store ────────────────────────────────────────────────────────────────
|
// ─── Store ────────────────────────────────────────────────────────────────
|
||||||
|
|||||||
@@ -85,6 +85,7 @@ import type { Breadcrumb, FileEntry } from '~/modules/integration/services/dto/s
|
|||||||
import { useShareService } from '~/modules/integration/services/share'
|
import { useShareService } from '~/modules/integration/services/share'
|
||||||
import { formatFileSize } from '~/utils/format'
|
import { formatFileSize } from '~/utils/format'
|
||||||
|
|
||||||
|
definePageMeta({ middleware: ['permission'], permission: 'integration.share.access' })
|
||||||
useHead({ title: 'Documents' })
|
useHead({ title: 'Documents' })
|
||||||
|
|
||||||
const { browse, search } = useShareService()
|
const { browse, search } = useShareService()
|
||||||
|
|||||||
Reference in New Issue
Block a user