diff --git a/manifest.toml b/manifest.toml index afbde66..7779a8f 100644 --- a/manifest.toml +++ b/manifest.toml @@ -7,7 +7,7 @@ name = "Wallabag" description.en = "Save and classify articles. Read them later" description.fr = "Enregistrez et classez les articles. Lisez-les plus tard" -version = "2.5.4~ynh10" +version = "2.5.4~ynh11" maintainers = ["lapineige"] diff --git a/sources/patches/main/00-ldap-auth.patch b/patches/main/00-ldap-auth.patch similarity index 100% rename from sources/patches/main/00-ldap-auth.patch rename to patches/main/00-ldap-auth.patch diff --git a/sources/patches/main/01-logout-success-handler.patch b/patches/main/01-logout-success-handler.patch similarity index 100% rename from sources/patches/main/01-logout-success-handler.patch rename to patches/main/01-logout-success-handler.patch diff --git a/sources/patches/main/02-oauth-workaround.patch b/patches/main/02-oauth-workaround.patch similarity index 100% rename from sources/patches/main/02-oauth-workaround.patch rename to patches/main/02-oauth-workaround.patch diff --git a/sources/patches/main-00-ldap-auth.patch b/sources/patches/main-00-ldap-auth.patch deleted file mode 100644 index 3a36f5e..0000000 --- a/sources/patches/main-00-ldap-auth.patch +++ /dev/null @@ -1,46 +0,0 @@ -diff --git a/app/config/security.yml b/app/config/security.yml -index 02afc9ea..5a3f7a34 100644 ---- a/app/config/security.yml -+++ b/app/config/security.yml -@@ -13,6 +13,14 @@ security: - property: username - fos_userbundle: - id: fos_user.user_provider.username_email -+ yunohost_users: -+ ldap: -+ service: yunohost.ldap -+ base_dn: ou=users,dc=yunohost,dc=org -+ search_dn: -+ search_password: -+ filter: (&(uid={username})(objectClass=posixAccount)) -+ default_roles: ROLE_USER - - # the main part of the security, where you can set up firewalls - # for specific sections of your app -@@ -38,6 +46,9 @@ security: - - secured_area: - pattern: ^/ -+ http_basic_ldap: -+ service: yunohost.ldap -+ dn_string: "uid={username},ou=users,dc=yunohost,dc=org" - form_login: - provider: fos_userbundle - csrf_token_generator: security.csrf.token_manager -diff --git a/app/config/services.yml b/app/config/services.yml -index 7b85d846..f23961c5 100644 ---- a/app/config/services.yml -+++ b/app/config/services.yml -@@ -43,6 +43,10 @@ services: - tags: - - { name: kernel.event_listener, event: security.interactive_login, method: onInteractiveLogin } - -+ yunohost.ldap: -+ class: Symfony\Component\Ldap\LdapClient -+ arguments: ["localhost"] -+ - craue_config_cache_provider: - class: Symfony\Component\Cache\Adapter\FilesystemAdapter - public: false --- -2.17.1 diff --git a/sources/patches/main-01-logout-success-handler.patch b/sources/patches/main-01-logout-success-handler.patch deleted file mode 100644 index d321d54..0000000 --- a/sources/patches/main-01-logout-success-handler.patch +++ /dev/null @@ -1,63 +0,0 @@ -diff --git a/app/config/security.yml b/app/config/security.yml -index 5a3f7a34..1720e741 100644 ---- a/app/config/security.yml -+++ b/app/config/security.yml -@@ -62,7 +62,7 @@ security: - - logout: - path: /logout -- target: / -+ success_handler: yunohost.logout_success_handler - - access_control: - - { path: ^/api/doc, roles: IS_AUTHENTICATED_ANONYMOUSLY } -diff --git a/app/config/services.yml b/app/config/services.yml -index f23961c5..f266e6d1 100644 ---- a/app/config/services.yml -+++ b/app/config/services.yml -@@ -43,6 +43,10 @@ services: - tags: - - { name: kernel.event_listener, event: security.interactive_login, method: onInteractiveLogin } - -+ yunohost.logout_success_handler: -+ class: Wallabag\YunoHostBundle\Security\LogoutSuccessHandler -+ -+ - yunohost.ldap: - class: Symfony\Component\Ldap\LdapClient - arguments: ["localhost"] -diff --git a/src/Wallabag/YunoHostBundle/Security/LogoutSuccessHandler.php b/src/Wallabag/YunoHostBundle/Security/LogoutSuccessHandler.php -new file mode 100644 -index 00000000..b3268243 ---- /dev/null -+++ b/src/Wallabag/YunoHostBundle/Security/LogoutSuccessHandler.php -@@ -0,0 +1,27 @@ -+encoderFactory->getEncoder($user); - -- if ($encoder->isPasswordValid($user->getPassword(), $password, $user->getSalt())) { -+ if (true) { - return array( - 'data' => $user, - );