Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 968f59edc5 | |||
| 7001687194 | |||
| 4b51a3cc05 | |||
| 3b3683c791 | |||
| 79bd47266a | |||
| 8aa54c187b | |||
| b61574bad2 | |||
| b8fa1d168d |
+1
-1
@@ -1,2 +1,2 @@
|
||||
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 isMailVisible = computed(() => {
|
||||
const roles: string[] = auth.user?.roles ?? []
|
||||
return roles.includes('ROLE_USER') || roles.includes('ROLE_ADMIN')
|
||||
})
|
||||
const { can } = usePermissions()
|
||||
|
||||
// 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 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 match = route.path.match(/^\/projects\/(\d+)/)
|
||||
|
||||
@@ -6,6 +6,7 @@ const { t } = useI18n()
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
|
||||
definePageMeta({ middleware: ['permission'], permission: 'mail.access' })
|
||||
useHead({ title: t('mail.title') })
|
||||
|
||||
// ─── Store ────────────────────────────────────────────────────────────────
|
||||
|
||||
@@ -85,6 +85,7 @@ import type { Breadcrumb, FileEntry } from '~/modules/integration/services/dto/s
|
||||
import { useShareService } from '~/modules/integration/services/share'
|
||||
import { formatFileSize } from '~/utils/format'
|
||||
|
||||
definePageMeta({ middleware: ['permission'], permission: 'integration.share.access' })
|
||||
useHead({ title: 'Documents' })
|
||||
|
||||
const { browse, search } = useShareService()
|
||||
|
||||
@@ -15,7 +15,9 @@ use Symfony\Component\Serializer\Attribute\Groups;
|
||||
uriTemplate: '/bookstack/shelves',
|
||||
normalizationContext: ['groups' => ['bookstack_shelf:read']],
|
||||
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',
|
||||
normalizationContext: ['groups' => ['gitea_repo:read']],
|
||||
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