What are the Slack Archives?
Itβs a history of our time together in the Slack Community! Thereβs a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.
Because this space is not active, you wonβt be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..
Hi all, has anyone already did a redirect, whenever the user is not logged in? We want to "close" ou
Comments
-
yes, we did something like this (but only for some pages, like for example the shopping cart). But i guess it could easily be extended to more pages
0 -
How did you do it? All I've seen so far is the
is_granted('ROLE_USER')
directly in the template0 -
i've not been involved, so i would have to ask for details, but we are using
CustomerAccessPermissionConfig
0 -
via
CustomerAccessPermissionClient
0 -
Great, I'll have a look at it π Thanks!
0 -
we've implemented a custom
CustomerSecurityServiceProvider
which overridessetSecurityAccessRules
0 -
giovanni.piemontese Technical Lead @ LΓΆffelhardt Spryker Solution Partner Posts: 871 π§π»βπ - Cadet
We did this... u have to define only the config customer secured and anonymous pattern right..
$config[CustomerConstants::CUSTOMER_SECURED_PATTERN] $config[CustomerConstants::CUSTOMER_ANONYMOUS_PATTERN]
0 -
Well π Surprisingly easy. Totally forgot about having a look into the config at all ?
$config[CustomerConstants::CUSTOMER_SECURED_PATTERN] = '^((?!\/login).)*$';
0 -
Thank you both π
0 -
if you want to really close it you can change the security provider to reverse the logic
0 -
on our project we have explicit white list for pages that we want to open
0 -
because the requirement was to have everything locked
0 -
with blacklisting there is a great chance that you will open something by mistake
0 -
@UKHD8KTMF I've extended the regex and added my cms-pages (like imprint, terms of agreement etc. should be available, even if not logged in). Luckily We don't have that much pages we need to open to the world.
Out of interest: How do you manage your whitelist?
0 -
Hi Daniel, on my project we have modified the
CustomerSecurityProvider
orCustomerSecurityServiceProvider
as it is now called. Basically we changed the order$app['security.access_rules']
and that reverted the logic.0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 76 Spryker News
- 930 Developer Corner
- 788 Spryker Development
- 89 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 35 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 26 Job Opportunities
- 3.2K π Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 33 Product & Business Questions
- 70 Spryker Safari Questions
- 50 Random