dbu/conference-tutorial — pull request #12 by dbu (2014-05-10 14:32:42+00:00)
Title: 12. Frontend editing and set up login

This is a rather large pull request. We configure security for the whole website and at the same time enable CmfCreateBundle for frontend editing.

In this pull request, you need to re-run composer install to get the new dependencies.

composer.phar install

Once this is done, you can use the login link to log into the application. The available logins are hardcoded in the `app/config/security.yml` file. To be allowed to edit, you need to log in with admin / adminpass.

To edit content, click the edit button and see what areas get green. If you get a long error message after saving, your webserver probably has no write permissions for the sqlite database. Sqlite needs not only the rights to edit the file, but also write access to the directory the file is in. Run

chmod 777 app/
chmod 666 app/app.sqlite

Note that in real projects, it is not a good idea to make the app directory world writeable. For a real project, use postgres or mysql, or jackalope-jackrabbit, or put the sqlite database into a different folder.

## Security

For the login setup, i simply copied the basic example provided in the [Symfony2 book](http://symfony.com/doc/2.3/book/security.html#using-a-traditional-login-form). For a real project you probably want to use the [FOSUserBundle](https://github.com/FriendsOfSymfony/FOSUserBundle).