Skip to content

Commit

Permalink
ensure logout works
Browse files Browse the repository at this point in the history
  • Loading branch information
dobri1408 committed Apr 19, 2024
1 parent c6222f9 commit bf0dca4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ import installContextNavigationBlock from '@eeacms/volto-eea-website-policy/comp
import { appendGroup } from './helpers';
import { FrequencyOfDissemination } from '@eeacms/volto-eea-website-policy/components/Widgets/FrequencyOfDissemination';
import Login from '@plone-collective/volto-authomatic/components/Login/Login.jsx';
import Logout from '@plone-collective/volto-authomatic/components/Logout/Logout.jsx';
import { Login as VoltoLogin } from '@plone/volto/components';

const restrictedBlocks = [
'imagecards',
// TODO: use what is needed from volto-datablocks after clean-up
Expand Down Expand Up @@ -55,7 +57,8 @@ const applyConfig = (config) => {
//Make azure login to be at route azure_login, and ldap login to be at /login

config.addonRoutes = config.addonRoutes.filter(
(route) => !route.path.includes('/login'),
(route) =>
!route.path.includes('/login') && !route.path.includes('/logout'),
);

config.addonRoutes.push(
Expand All @@ -66,6 +69,8 @@ const applyConfig = (config) => {
{ path: '/**/azure_login', component: Login },
{ path: '/login', component: VoltoLogin },
{ path: '/**/login', component: VoltoLogin },
{ path: '/logout', component: Logout },
{ path: '/**/logout', component: Logout },
);

// #160689 Redirect contact-form to contact-us
Expand Down

0 comments on commit bf0dca4

Please sign in to comment.