srcf
This commit is contained in:
@@ -7,8 +7,7 @@ node_modules/
|
||||
.env.*.local
|
||||
|
||||
# Cache et logs Symfony
|
||||
var/cache/
|
||||
var/log/
|
||||
var
|
||||
|
||||
# Build front-end
|
||||
public/build/
|
||||
|
@@ -22,7 +22,7 @@ security:
|
||||
form_login:
|
||||
login_path: app_login
|
||||
check_path: app_login
|
||||
enable_csrf: true
|
||||
enable_csrf: false
|
||||
csrf_token_id: authenticate
|
||||
csrf_parameter: _csrf_token
|
||||
default_target_path: /
|
||||
|
@@ -11,9 +11,10 @@ COPY ./misc/docker/apache.conf /etc/apache2/conf.d/nine/site.conf
|
||||
WORKDIR /app
|
||||
|
||||
# Crée vendor à l’avance et donne les droits
|
||||
RUN mkdir -p /app/vendor && chown -R apache:apache /app
|
||||
RUN mkdir -p /app/vendor && mkdir -p /app/var && chown -R apache:apache /app
|
||||
|
||||
USER apache
|
||||
WORKDIR /app
|
||||
COPY --chown=apache:apache . .
|
||||
|
||||
RUN composer install --no-interaction
|
||||
|
@@ -12,7 +12,6 @@ use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface;
|
||||
use Symfony\Component\Routing\Attribute\Route;
|
||||
use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface;
|
||||
|
||||
class UserController extends AbstractController
|
||||
{
|
||||
@@ -126,11 +125,8 @@ class UserController extends AbstractController
|
||||
}
|
||||
|
||||
#[Route('/user', name: 'app_user_profil')]
|
||||
public function profil(CsrfTokenManagerInterface $csrfTokenManager, Request $request, UserPasswordHasherInterface $passwordHasher, EntityManagerInterface $em): Response
|
||||
public function profil(Request $request, UserPasswordHasherInterface $passwordHasher, EntityManagerInterface $em): Response
|
||||
{
|
||||
$token = $csrfTokenManager->getToken('user')->getValue();
|
||||
dump($token);
|
||||
|
||||
$user = $em->getRepository(User::class)->find($this->getUser());
|
||||
if (!$user) {
|
||||
return $this->redirectToRoute('app_home');
|
||||
|
@@ -31,11 +31,6 @@ class UserType extends AbstractType
|
||||
'label' => 'Login',
|
||||
])
|
||||
|
||||
->add('apikey', TextType::class, [
|
||||
'label' => 'apikey',
|
||||
'required' => false,
|
||||
])
|
||||
|
||||
->add('avatar', HiddenType::class)
|
||||
|
||||
->add('email', EmailType::class, [
|
||||
@@ -56,6 +51,7 @@ class UserType extends AbstractType
|
||||
'choice_label' => 'title',
|
||||
'multiple' => true,
|
||||
'attr' => ['class' => 'select2'],
|
||||
'required' => false,
|
||||
]);
|
||||
}
|
||||
|
||||
|
@@ -32,13 +32,6 @@
|
||||
{{ form_row(form.email) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">Redmine</div>
|
||||
<div class="card-body">
|
||||
{{ form_row(form.apikey) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{%if form.roles is defined%}
|
||||
|
Reference in New Issue
Block a user