sulu / sulu-standard

This repository is not longer the recommended way to start a sulu project. Use:
https://github.com/sulu/skeleton
MIT License
614 stars 106 forks source link

Error after installation #17

Closed maks-rafalko closed 10 years ago

maks-rafalko commented 10 years ago

After installation steps site doesn't work:

ServiceNotFoundException: The service "user.services.user_data" has a dependency on a non-existent service "security.context".

danrot commented 10 years ago

When did you clone Sulu? I had yesterday evening the same issue, and i realized that i forgot to update the composer dependencies. So try to update Sulu with git pull origin develop and another composer install. If it does not help try a composer update as well, although it should not be necessary.

maks-rafalko commented 10 years ago

I created this issue some minutes after installations according to your Installation plan I will retry with composer this evening and let you know about results.

maks-rafalko commented 10 years ago

So something is still broken. I tried to install Sulu on both Windows and MacOS lap tops, but always get the same error. What step is missed in installation guide?

I see some sulu CLI commands, may be they should be invoked? composer install and updated don't help.

maks-rafalko commented 10 years ago

Hm, it works only in sulu.lo/admin

danrot commented 10 years ago

Sry about that, we forgot to include that in the installation guide. Until now we have only been working on the administration part, there is no website yet. The error you had was the same for me yesterday evening, that's why I confused it with that. And I have to admit that there is another error, because the service should not be included in the website environment...

danrot commented 10 years ago

@turbo-ele It looks to me like you mixed up the naming conventions here: there is no prefix and we have never used the word services in the service definition.

@chirimoya We should also think about how to integrate the security bundle in the website kernel. The exception here only occurs because it is included there. We have to remove it (but then we don't have any security features on the website, which we later could possibly need for customer logins), or we set up a correct security.yml-file allowing everything except the special URLs configured in the access_control-section (which means extra work on every request).

chirimoya commented 10 years ago

@drotter every portal definitely needs a security setting e.g. free, partially protected, protected. But I'm currently not sure how to solve this problem.

Is the current security bundle able to handle this requirements? I think it should. So each portal should be treat as a "security system" and should provide security contexts?

danrot commented 10 years ago

The problem is that as soon as we have one protected portal the security mechanism is executed for every request, which has an impact on the performance.

I don't think that it is too hard to implement the security for the portals. I don't think we need to define the security settings for each portal, since the security mechanism is called for every request anyway.

And do we need security contexts at all? For this part the security has to check if the user is allowed to access on every object, not on a security context, at least that was on my mind.

chirimoya commented 10 years ago

I think the portal detection should be a kernel listener (http://symfony.com/doc/current/cookbook/service_container/event_listener.html) and it would be perfect if there the decision will be made to add security or not. Also don't forget any app aspect of a portal (shop, community, ..) which defins security contexts for sure.

danrot commented 10 years ago

Adding security means to load Symfony's and Sulu's SecurityBundle. I have not found any working solution to add these outside of the registerBundles-function.

chirimoya commented 10 years ago

Maybe we should ping a symfony pro?