From 1effd26ee92f54e4a6c0f55e279caca51fe7eb4c Mon Sep 17 00:00:00 2001 From: Jannis Portmann Date: Fri, 30 Apr 2021 21:24:51 +0200 Subject: [PATCH 1/4] restrict admin access to ROLE_ADMIN --- config/packages/security.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/packages/security.yaml b/config/packages/security.yaml index 246da82..708406d 100644 --- a/config/packages/security.yaml +++ b/config/packages/security.yaml @@ -36,4 +36,5 @@ security: # Note: Only the *first* access control that matches will be used access_control: # - { path: ^/admin, roles: ROLE_ADMIN } - - { path: ^(?!/(login|register|reset-password)), roles: ROLE_USER } + - { path: ^/admin, roles: ROLE_ADMIN } + - { path: ^(?!/(login|register|reset-password)), roles: ROLE_USER } \ No newline at end of file From c7e261745bb6798bd4b7dd6544f086f06dd0cbc2 Mon Sep 17 00:00:00 2001 From: Jannis Portmann Date: Sat, 1 May 2021 00:14:32 +0200 Subject: [PATCH 2/4] update homepage link --- templates/base.html.twig | 51 ++++++++++++++++------------------------ 1 file changed, 20 insertions(+), 31 deletions(-) diff --git a/templates/base.html.twig b/templates/base.html.twig index f021bc0..4850a40 100644 --- a/templates/base.html.twig +++ b/templates/base.html.twig @@ -16,37 +16,26 @@ - - +
{% block body %}{% endblock %} From 351c4c7dc8bd45e15cc97640016e336e4a12aad3 Mon Sep 17 00:00:00 2001 From: Jannis Portmann Date: Sat, 1 May 2021 00:14:57 +0200 Subject: [PATCH 3/4] Add form to update user settings --- templates/app/user.html.twig | 39 +++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/templates/app/user.html.twig b/templates/app/user.html.twig index ff1c2e5..d11cfa9 100644 --- a/templates/app/user.html.twig +++ b/templates/app/user.html.twig @@ -3,7 +3,40 @@ {% block title %}User{% endblock %} {% block body %} -
-

Hello {{ user.username }}!

-

+ {% for message in app.flashes('success') %} + + {% endfor %} + +
+

Hello {{ user.username }}!

+

+ +
+
+

Change your user data

+
+ + +
+
+ + +
+ + + + +
+
+ +
+

Delete Account

+ +
{% endblock %} From 85289c0e64fc83836b39c306025c6ac91b086edc Mon Sep 17 00:00:00 2001 From: Jannis Portmann Date: Sat, 1 May 2021 00:18:31 +0200 Subject: [PATCH 4/4] add link for forgot password --- templates/security/login.html.twig | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/security/login.html.twig b/templates/security/login.html.twig index 8d6ff2e..7323232 100644 --- a/templates/security/login.html.twig +++ b/templates/security/login.html.twig @@ -22,6 +22,7 @@
+ Forgot password