Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 968f59edc5 | |||
| 7001687194 | |||
| 4b51a3cc05 | |||
| 3b3683c791 | |||
| 79bd47266a | |||
| 8aa54c187b | |||
| b61574bad2 | |||
| b8fa1d168d | |||
| a2334789ae | |||
| fc18200d63 |
+1
-1
@@ -1,2 +1,2 @@
|
|||||||
parameters:
|
parameters:
|
||||||
app.version: '0.4.49'
|
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()
|
||||||
|
|||||||
@@ -15,7 +15,9 @@ use Symfony\Component\Serializer\Attribute\Groups;
|
|||||||
uriTemplate: '/bookstack/shelves',
|
uriTemplate: '/bookstack/shelves',
|
||||||
normalizationContext: ['groups' => ['bookstack_shelf:read']],
|
normalizationContext: ['groups' => ['bookstack_shelf:read']],
|
||||||
provider: BookStackShelfProvider::class,
|
provider: BookStackShelfProvider::class,
|
||||||
security: "is_granted('ROLE_ADMIN')",
|
// Liste toutes les étagères visibles par le token BookStack global :
|
||||||
|
// réservé à qui configure un projet (ProjectDrawer), pas à tout user.
|
||||||
|
security: "is_granted('project-management.projects.manage')",
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
)]
|
)]
|
||||||
|
|||||||
@@ -15,7 +15,9 @@ use Symfony\Component\Serializer\Attribute\Groups;
|
|||||||
uriTemplate: '/gitea/repositories',
|
uriTemplate: '/gitea/repositories',
|
||||||
normalizationContext: ['groups' => ['gitea_repo:read']],
|
normalizationContext: ['groups' => ['gitea_repo:read']],
|
||||||
provider: GiteaRepositoryProvider::class,
|
provider: GiteaRepositoryProvider::class,
|
||||||
security: "is_granted('ROLE_ADMIN')",
|
// Liste l'intégralité des dépôts visibles par le token Gitea global :
|
||||||
|
// réservé à qui configure un projet (ProjectDrawer), pas à tout user.
|
||||||
|
security: "is_granted('project-management.projects.manage')",
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
)]
|
)]
|
||||||
|
|||||||
Reference in New Issue
Block a user