modification du form user pour afficher les rôle lors du new
This commit is contained in:
commit
56809b3fbc
4
.idea/dataSources.xml
generated
4
.idea/dataSources.xml
generated
@ -1,11 +1,11 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
|
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
|
||||||
<data-source source="LOCAL" name="hegreetconfort@localhost" uuid="21423ae4-3232-4641-affb-06399f70655a">
|
<data-source source="LOCAL" name="HegreEtConfort@localhost" uuid="21423ae4-3232-4641-affb-06399f70655a">
|
||||||
<driver-ref>postgresql</driver-ref>
|
<driver-ref>postgresql</driver-ref>
|
||||||
<synchronize>true</synchronize>
|
<synchronize>true</synchronize>
|
||||||
<jdbc-driver>org.postgresql.Driver</jdbc-driver>
|
<jdbc-driver>org.postgresql.Driver</jdbc-driver>
|
||||||
<jdbc-url>jdbc:postgresql://localhost:5432/hegreetconfort</jdbc-url>
|
<jdbc-url>jdbc:postgresql://localhost:5433/HegreEtConfort</jdbc-url>
|
||||||
<working-dir>$ProjectFileDir$</working-dir>
|
<working-dir>$ProjectFileDir$</working-dir>
|
||||||
</data-source>
|
</data-source>
|
||||||
</component>
|
</component>
|
||||||
|
File diff suppressed because one or more lines are too long
4
assets/vendor/@hotwired/turbo/turbo.index.js
vendored
4
assets/vendor/@hotwired/turbo/turbo.index.js
vendored
@ -1,5 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
|
<<<<<<< HEAD
|
||||||
* Bundled by jsDelivr using Rollup v2.79.1 and Terser v5.19.2.
|
* Bundled by jsDelivr using Rollup v2.79.1 and Terser v5.19.2.
|
||||||
|
=======
|
||||||
|
* Bundled by jsDelivr using Rollup v2.79.2 and Terser v5.39.0.
|
||||||
|
>>>>>>> b29391d6550c182d7b75efab8795a238c1936a27
|
||||||
* Original file: /npm/@hotwired/turbo@7.3.0/dist/turbo.es2017-esm.js
|
* Original file: /npm/@hotwired/turbo@7.3.0/dist/turbo.es2017-esm.js
|
||||||
*
|
*
|
||||||
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
|
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
"symfony/property-info": "7.1.*",
|
"symfony/property-info": "7.1.*",
|
||||||
"symfony/runtime": "7.1.*",
|
"symfony/runtime": "7.1.*",
|
||||||
"symfony/security-bundle": "7.1.*",
|
"symfony/security-bundle": "7.1.*",
|
||||||
|
"symfony/security-csrf": "7.1.*",
|
||||||
"symfony/serializer": "7.1.*",
|
"symfony/serializer": "7.1.*",
|
||||||
"symfony/stimulus-bundle": "^2.20",
|
"symfony/stimulus-bundle": "^2.20",
|
||||||
"symfony/string": "7.1.*",
|
"symfony/string": "7.1.*",
|
||||||
|
2
composer.lock
generated
2
composer.lock
generated
@ -4,7 +4,7 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "e99a99b4ca2d6b58821cb711cb543c93",
|
"content-hash": "69565ad2398a468ae94c92c449ee3c20",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "composer/semver",
|
"name": "composer/semver",
|
||||||
|
@ -14,14 +14,14 @@ security:
|
|||||||
lazy: true
|
lazy: true
|
||||||
provider: app_user_provider
|
provider: app_user_provider
|
||||||
form_login:
|
form_login:
|
||||||
login_path: _login
|
login_path: app_login
|
||||||
check_path: _login
|
check_path: app_login
|
||||||
success_handler: App\Security\CustomAuthenticationSuccessHandler
|
success_handler: App\Security\CustomAuthenticationSuccessHandler
|
||||||
enable_csrf: true
|
enable_csrf: true
|
||||||
csrf_token_id: authenticate
|
csrf_token_id: authenticate
|
||||||
logout:
|
logout:
|
||||||
path: _logout
|
path: app_logout
|
||||||
target: _login
|
target: app_login
|
||||||
|
|
||||||
# activate different ways to authenticate
|
# activate different ways to authenticate
|
||||||
# https://symfony.com/doc/current/security.html#the-firewall
|
# https://symfony.com/doc/current/security.html#the-firewall
|
||||||
|
@ -9,7 +9,7 @@ use Symfony\Component\Security\Http\Authentication\AuthenticationUtils;
|
|||||||
|
|
||||||
class AuthenticationController extends AbstractController
|
class AuthenticationController extends AbstractController
|
||||||
{
|
{
|
||||||
#[Route(path: '/', name: '_login')]
|
#[Route(path: '/', name: 'app_login')]
|
||||||
public function login(AuthenticationUtils $authenticationUtils): Response
|
public function login(AuthenticationUtils $authenticationUtils): Response
|
||||||
{
|
{
|
||||||
// get the login error if there is one
|
// get the login error if there is one
|
||||||
@ -24,7 +24,7 @@ class AuthenticationController extends AbstractController
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[Route(path: '/logout', name: '_logout')]
|
#[Route(path: '/logout', name: 'app_logout')]
|
||||||
public function logout(): void
|
public function logout(): void
|
||||||
{
|
{
|
||||||
throw new \LogicException('This method can be blank - it will be intercepted by the logout key on your firewall.');
|
throw new \LogicException('This method can be blank - it will be intercepted by the logout key on your firewall.');
|
||||||
|
@ -23,6 +23,10 @@ class UserType extends AbstractType
|
|||||||
])
|
])
|
||||||
->add('Phone', TextType::class)
|
->add('Phone', TextType::class)
|
||||||
->add('roles', ChoiceType::class, [
|
->add('roles', ChoiceType::class, [
|
||||||
|
'choices' => [
|
||||||
|
'Secretaire' => 'ROLE_SECRETAIRE',
|
||||||
|
'Chauffagiste' => 'ROLE_CHAUFFAGISTE',
|
||||||
|
],
|
||||||
'multiple' => true,
|
'multiple' => true,
|
||||||
])
|
])
|
||||||
->add('password', TextType::class)
|
->add('password', TextType::class)
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
<li><a href="{{ path('stock_index') }}">Pièces détachées</a></li>
|
<li><a href="{{ path('stock_index') }}">Pièces détachées</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<li><a href="{{ path('_logout') }}">Déconnexion</a></li>
|
<li><a href="{{ path('app_logout') }}">Déconnexion</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
<img class="logoProfile" src="{{ asset('styles/image/profile.png') }}" alt="Logo Profil">
|
<img class="logoProfile" src="{{ asset('styles/image/profile.png') }}" alt="Logo Profil">
|
||||||
<img class="logoPassword" src="{{ asset('styles/image/password.png') }}" alt="Logo Password">
|
<img class="logoPassword" src="{{ asset('styles/image/password.png') }}" alt="Logo Password">
|
||||||
|
|
||||||
<form method="post" action="{{ path('_login') }}">
|
<form method="post" action="{{ path('app_login') }}">
|
||||||
{% if error %}
|
{% if error %}
|
||||||
<div class="alert alert-danger">{{ error.messageKey|trans(error.messageData, 'security') }}</div>
|
<div class="alert alert-danger">{{ error.messageKey|trans(error.messageData, 'security') }}</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user