Skip to content

Commit

Permalink
Ajout de la sécurité
Browse files Browse the repository at this point in the history
  • Loading branch information
stakovicz committed Feb 13, 2025
1 parent e601b88 commit 1af21b1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/config/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ security:
- { path: ^/admin/members/general_meeting_vote, roles: ROLE_ADMIN }
- { path: ^/admin/site, roles: ROLE_ADMIN }
- { path: ^/admin/planete, roles: ROLE_ADMIN }
- { path: ^/admin/(members/reporting|association/relances|talk|slackmembers/check), roles: ROLE_ADMIN}
- { path: ^/admin/(members/reporting|association/relances|talk|slackmembers/check|healthcheck), roles: ROLE_ADMIN}
- { path: ^/member, roles: [ROLE_USER, ROLE_MEMBER_EXPIRED]}
- { path: ^/admin/, roles: ROLE_MEMBER_EXPIRED }
- { path: ^/blog, allow_if: "request.getClientIp() in ['217.70.189.71', '127.0.0.1', '192.168.42.1'] or request.server.get('ALLOW_BLOG_FROM_ALL') == 1 or request.headers.get('x-afup-blog-api-key') == '%blog_api_key%'" }
Expand Down
8 changes: 7 additions & 1 deletion tests/behat/features/Admin/Divers/Healthcheck.feature
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
Feature: Administration - Healthcheck

@reloadDbWithTestData
Scenario: Vérification des dates
Scenario: Un membre ne peut pas accéder aux vérifications du site
Given I am logged-in with the user "paul" and the password "paul"
And I am on "/admin/healthcheck"
Then the response status code should be 403

@reloadDbWithTestData
Scenario: Vérifications du site
Given I am logged in as admin and on the Administration
And I follow "Healthcheck"
Then I should see "Healthcheck"
Expand Down

0 comments on commit 1af21b1

Please sign in to comment.