Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DDFBRA-349 - Add access control check for node type links in the admin page (/admin/content/add) #1980

Merged

Conversation

kasperbirch1
Copy link
Contributor

Link to issue

https://reload.atlassian.net/browse/DDFBRA-349

Description

This pull request ensures that only content types the user has access to are displayed.

The logic is inspired by the core implementation in web/core/modules/node/src/Controller/NodeController.php for /admin/content/add, which has been overridden in web/modules/custom/dpl_admin/dpl_admin.routing.yml.

Super Admin
Skærmbillede 2025-01-15 kl  14 08 59

Editor:
Skærmbillede 2025-01-15 kl  14 09 17

…in/content/add`)

Ensures that only content types the user has access to are displayed.

The logic is inspired by the "core" implementation in `web/core/modules/node/src/Controller/NodeController.php` for `/admin/content/add`, which we  overridden in `web/modules/custom/dpl_admin/dpl_admin.routing.yml`.
Copy link
Contributor

@Dresse Dresse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 👍

@Dresse Dresse assigned kasperbirch1 and unassigned kasperg, xendk and Dresse Jan 20, 2025
@kasperbirch1 kasperbirch1 merged commit 445dd32 into develop Jan 20, 2025
20 checks passed
@kasperbirch1 kasperbirch1 deleted the DDFBRA-349-skjul-go-content-typer-for-ikke-go-editor branch January 20, 2025 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants