As of 2012, there were 612,843,429 websites on the Internet. This number is rapidly growing.
So why do people create websites?
So, in this note we will learn how to restrict access to sections of a website written using Symfony framework. Symfony framework provides powerful tools for access control, which allow you to restrict access both by url and entire controllers.
Quite an important task in the development of websites and web applications is restricting access to certain sections of the site, such as the admin panel. In theory, this is a rather complex process, consisting of three components - authentication, identification, and authorization.
I decided to install kernel 3.10.4 with the tuxonice patch on my Gentoo.
The result was very satisfying, many system problems disappeared, and this is considering the fact that I did not modify the old kernel configuration. The first thing I noticed is that the network finally started working properly after waking up from suspend.
But there was something that needed adjustment.
In the previous lesson, we learned how to create simple forms in Symfony framework that contain (and modify if necessary) data from tables. As you remember, we used models (entities) of these tables.
But in practice, we have to solve more complex tasks. For example, displaying/modifying data from multiple tables in Symfony framework.
A rough example - one table contains articles, and there is a field that sets the section id (which has a separate table). We need to make it possible to conveniently select a section for an article. Fortunately, this is a routine task for Symfony framework. =)