{"id":270677,"date":"2015-12-18T17:13:02","date_gmt":"2015-12-18T14:13:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=270677"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=270677","title":{"rendered":"Symfony2 Voters \u0438 Doctrine Filters \u043d\u0430 \u0441\u0442\u0440\u0430\u0436\u0435 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438"},"content":{"rendered":"<p>       \u0412\u0441\u0435 \u043d\u0430\u0447\u0430\u043b\u043e\u0441\u044c, \u043a\u043e\u0433\u0434\u0430 \u044f \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043b \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u043e\u0434\u043d\u043e\u0439 CRM. \u041a\u0430\u043a \u044d\u0442\u043e \u0447\u0430\u0441\u0442\u043e \u0431\u044b\u0432\u0430\u0435\u0442, \u0432 \u043d\u0435\u0439 \u0431\u044b\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0443\u0440\u043e\u0432\u043d\u044f\u043c\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u043c \u0434\u0430\u043d\u043d\u044b\u043c (\u043d\u0430\u0437\u043e\u0432\u0435\u043c \u0438\u0445 entities ;)). \u0412\u0438\u0434 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u0433\u0440\u0438\u0434\u0430 \u0443 \u043d\u0438\u0445 \u0431\u044b\u043b \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0439, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0430 \u0431\u044b\u043b\u0430 \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a entities. \u0421\u043f\u0435\u0440\u0432\u0430 \u044f \u043f\u043e\u0434\u0443\u043c\u0430\u043b \u043e\u0431 ACL, \u043d\u043e\u2026<br \/>  <a name=\"habracut\"><\/a><br \/>  \u2026 \u043d\u0438\u0447\u0435\u0433\u043e \u0442\u0430\u043a\u043e\u0433\u043e \u043d\u0435 \u0441\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c.<\/p>\n<p>  <b>ACL <\/b>(Access Control List) \u2014 \u044d\u0442\u043e \u0442\u0430\u043a\u0438\u0435 \u0441\u043f\u0438\u0441\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0445\u0440\u0430\u043d\u044f\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0434\u0435\u043b\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c (\u0438\u043b\u0438 \u0433\u0440\u0443\u043f\u043f\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439) \u0441 \u043a\u0430\u0436\u0434\u044b\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c \u0437\u0430\u0449\u0438\u0442\u044b. \u0423 Symfony \u0435\u0441\u0442\u044c \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c <a href=\"http:\/\/symfony.com\/doc\/current\/cookbook\/security\/acl.html\">ACL<\/a>, \u0438 \u044f \u043f\u043e\u043b\u0435\u0437 \u0435\u0433\u043e \u0438\u0437\u0443\u0447\u0430\u0442\u044c. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u043b \u043f\u0440\u0438\u043c\u0435\u0440 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0437\u0430\u0449\u0438\u0442\u044b \u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442. \u041f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u0436\u0435 \u043f\u0440\u043e\u0447\u0442\u0435\u043d\u0438\u0438 \u043c\u043d\u0435 \u043d\u0435 \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0438 \u0432\u0435\u0448\u0430\u043b\u0438\u0441\u044c \u043d\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f: \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043c\u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0431\u044b \u0433\u043e\u0440\u043e\u0434\u0438\u0442\u044c \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0439, \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u044f\u044f \u0432\u0441\u0435\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0438 \u0438\u0445 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f. \u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u043a\u0440\u0430\u0442\u043a\u043e\u0435 \u0433\u0443\u0433\u043b\u0435\u043d\u0438\u0435 \u0432\u044b\u0432\u0435\u043b\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043b\u043e \u043c\u043d\u0435, \u0447\u0442\u043e \u043a\u0440\u043e\u043c\u0435 UserSecurityIdentity, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u043b \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0435\u0441\u0442\u044c \u0438 <a href=\"http:\/\/api.symfony.com\/2.7\/Symfony\/Component\/Security\/Acl\/Domain\/RoleSecurityIdentity.html\">RoleSecurityIdentity<\/a>. \u041e\u0442\u043b\u0438\u0447\u043d\u043e! \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u044f \u043f\u0440\u0438\u044f\u0442\u043d\u043e \u0443\u0434\u0438\u0432\u0438\u043b\u0441\u044f, \u0443\u0437\u043d\u0430\u0432, \u0447\u0442\u043e \u0432\u0435\u0448\u0430\u0442\u044c \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u044b, \u043d\u043e \u0438 \u043d\u0430 \u043a\u043b\u0430\u0441\u0441\u044b. \u0427\u0442\u043e \u0436\u0435, \u043e\u0442\u043b\u0438\u0447\u043d\u043e, \u043d\u043e \u043c\u043d\u0435 \u044d\u0442\u043e \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442, \u0442.\u043a. \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f Entity. \u0421\u043e\u0431\u0440\u0430\u0432 \u0432\u0441\u0435 \u043c\u044b\u0441\u043b\u0438 \u0432 \u043a\u0443\u0447\u0443, \u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043b \u043a\u0430\u043a \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0432\u0441\u0435 \u044d\u0442\u043e \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c: \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u043b\u0438\u0441\u044d\u043d\u0435\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u043e\u0442\u043b\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 Entity, \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f Entity \u0438 \u043f\u0438\u0441\u0430\u0442\u044c, \u043f\u0438\u0441\u0430\u0442\u044c ACE \u0432 \u0411\u0414 (\u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0440\u043e\u043b\u0435\u0439, \u0430 \u0438\u0445 \u0441\u043e \u0441\u0442\u0430\u0440\u0442\u0430 \u0431\u044b\u043b\u043e \u0431\u043e\u043b\u044c\u0448\u0435 20). \u0410 \u043f\u043e\u0442\u043e\u043c, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0447\u0442\u043e-\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u044f \u0431\u0443\u0434\u0443 \u0438\u0441\u043a\u0430\u0442\u044c \u043e\u0434\u043d\u0443 (\u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e, \u0435\u0441\u043b\u0438 \u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u043e\u043b\u0435\u0439) \u0438\u0437 \u043c\u043d\u043e\u0433\u0438\u0445 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u043e\u0432 ACE \u0447\u0442\u043e\u0431\u044b \u0443\u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043e. \u0412 \u043e\u0431\u0449\u0435\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u043c\u043d\u0435 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0433\u0440\u043e\u043c\u043e\u0437\u0434\u043a\u043e\u0439 \u0438 \u0442\u043e\u043f\u043e\u0440\u043d\u043e\u0439, \u0445\u043e\u0442\u044f, \u0438 \u044d\u0442\u043e\u0433\u043e \u0443 \u043d\u0435\u0435 \u043d\u0435 \u043e\u0442\u043d\u044f\u0442\u044c, \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043e\u043d\u0430 \u0441\u0432\u043e\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0447\u0435\u0442\u043a\u043e \u0438 \u0434\u043e\u0442\u043e\u0448\u043d\u043e. <\/p>\n<p>  \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u044f \u0434\u0430\u0436\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0432\u043e\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b ACL <s>\u0441 \u043f\u0440\u0435\u0444\u0435\u0440\u0430\u043d\u0441\u043e\u043c \u0438 \u043f\u0443\u0442\u0430\u043d\u0430\u043c\u0438<\/s>, \u043d\u043e \u043e\u0442\u0431\u0440\u043e\u0441\u0438\u043b \u043a\u0430\u043a \u043d\u0435\u043d\u0443\u0436\u043d\u043e\u0435 \u0432\u0435\u043b\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435. \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043f\u043b\u044e\u0441 \u0432\u0441\u0435\u0439 \u044d\u0442\u043e\u0439 \u043c\u0438\u0448\u0443\u0440\u044b \u2014 \u044f \u0440\u0435\u0448\u0438\u043b \u0447\u0442\u043e \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0430\u0441\u043a\u0438, \u0442\u0430\u043a \u043a\u0430\u043a \u0440\u043e\u043b\u0435\u0439 \u0443 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043c\u043e\u0433\u043b\u043e \u0431\u044b\u0442\u044c \u043c\u043d\u043e\u0433\u043e, \u0430 \u043c\u043d\u0435 \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u0438\u0441\u044c \u043a\u0443\u043c\u0443\u043b\u044f\u0442\u0438\u0432\u043d\u044b\u0435 \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0438)<\/p>\n<p>  \u042f \u0440\u0435\u0448\u0438\u043b \u0440\u0430\u0437\u0431\u0438\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0443, \u0438 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0437\u0430\u043d\u044f\u0442\u044c\u0441\u044f \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043f\u0440\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0438 Entities. \u0422\u0443\u0442 \u044f \u043f\u043e\u0434\u0443\u043c\u0430\u043b \u2014 \u0430 \u043d\u0430\u043f\u0438\u0448\u0443-\u043a\u0430 \u044f \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b \u0431\u044b \u0432\u0441\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u0430. \u041d\u043e \u044d\u0442\u043e \u043d\u0435 \u0441\u043f\u0430\u0441\u043b\u043e \u0431\u044b \u043c\u0435\u043d\u044f, \u0435\u0441\u043b\u0438 \u0431\u044b \u043a\u0442\u043e-\u0442\u043e \u0440\u0435\u0448\u0438\u043b \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f DQL, \u0438\u043b\u0438 \u0434\u0430\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441 \u0441 join \u0438\u0437 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f. \u0422\u043e\u0433\u0434\u0430 \u044f \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u043b, \u043f\u0440\u043e doctrine extensions, \u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e \u2014 <a href=\"https:\/\/github.com\/Atlantic18\/DoctrineExtensions\/blob\/master\/doc\/softdeleteable.md\">softdeletable<\/a>. \u0421\u0430\u043c\u043e\u043c\u0443 \u043c\u043d\u0435 \u043e\u043d \u043d\u0438 \u0440\u0430\u0437\u0443 \u043d\u0435 \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u043b\u0441\u044f, \u044f \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u043d\u0430\u043b \u0447\u0442\u043e \u043e\u043d \u0435\u0441\u0442\u044c.<br \/>  \u042d\u0442\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u0443\u043d\u044f\u0442\u044c \u0431\u043e\u043b\u044c, \u043a\u043e\u0433\u0434\u0430 \u043d\u0430\u0434\u043e \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u0441 \u043a\u0443\u0447\u0435\u0439 \u0441\u0432\u044f\u0437\u0435\u0439 (\u044f \u0432\u0441\u0435\u0433\u0434\u0430 \u0441\u0447\u0438\u0442\u0430\u043b \u044d\u0442\u043e \u0441\u0438\u043c\u043f\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043b\u0435\u0447\u0435\u043d\u0438\u0435\u043c, \u0438 \u0434\u043e\u0431\u0440\u043e\u0441\u043e\u0432\u0435\u0441\u0442\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043b \u043a\u0430\u0441\u043a\u0430\u0434\u044b). \u041e\u043d\u043e \u043f\u043e\u043c\u0435\u0447\u0430\u0435\u0442 \u043d\u0435\u0443\u0433\u043e\u0434\u043d\u044b\u0435 entities \u043a\u0430\u043a \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0435. \u0418 \u0432\u0441\u0435. \u0412 \u0411\u0414 \u043e\u043d\u0438 \u043e\u0441\u0442\u0430\u044e\u0442\u0441\u044f, \u043d\u043e doctrine \u0441\u0442\u0430\u0440\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0432\u0438\u0434, \u0447\u0442\u043e \u0438\u0445 \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442. \u041d\u043e \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u0442\u0430\u043c \u0431\u044b\u043b\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u201c\u0440\u0430\u0437\u0443\u0434\u0430\u043b\u0438\u0442\u044c\u201d, \u0438\u043b\u0438 \u0445\u043e\u0442\u044f \u0431\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u043e\u043e\u0431\u0449\u0435 \u0432\u0441\u0435, \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u201c\u0442\u0438\u043f\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u043c\u0438\u201d \u0437\u0430\u043f\u0438\u0441\u044f\u043c\u0438.<br \/>  \u0418\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043c\u043d\u0435 \u0438 \u0431\u044b\u043b\u043e \u043d\u0443\u0436\u043d\u043e, \u0442\u0430\u043a \u0447\u0442\u043e \u044f \u0432\u043e\u0437\u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u0438\u043b \u0431\u043e\u0433\u043e\u0432 \u0437\u0430 \u043e\u043f\u0435\u043d\u0441\u043e\u0440\u0441 \u0438 \u043f\u043e\u043b\u0435\u0437 \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043a\u0430\u043a \u043e\u043d\u0438 \u044d\u0442\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043d\u0443\u043b\u0438. \u0422\u0430\u043a \u044f \u0443\u0437\u043d\u0430\u043b \u043f\u0440\u043e <a href=\"http:\/\/doctrine-orm.readthedocs.org\/projects\/doctrine-orm\/en\/latest\/reference\/filters.html\">\u0444\u0438\u043b\u044c\u0442\u0440\u044b<\/a>.<\/p>\n<p>  \u0427\u0435\u0440\u0435\u0437 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u043a \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u044f \u0443\u0437\u043d\u0430\u043b \u043a\u0430\u043a \u0441 \u044d\u0442\u0438\u043c \u0436\u0438\u0442\u044c, \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0441\u0432\u043e\u0439 \u043f\u0435\u0440\u0432\u044b\u0439 \u0444\u0438\u043b\u044c\u0442\u0440. \u0422\u0443\u0442 \u043a\u043e \u043c\u043d\u0435 \u043f\u043e\u0434\u043a\u0440\u0430\u043b\u0441\u044f \u0432\u043e\u043f\u0440\u043e\u0441 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u0430\u043c\u043e\u0433\u043e \u0444\u0438\u043b\u044c\u0440\u0430. \u041c\u0435\u043d\u044f \u043d\u0435 \u0443\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043b\u043e \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0435\u0433\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043f\u0440\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u2014 \u0432\u0441\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043f\u043e\u043d\u044f\u0442\u043d\u043e \u0438 \u201c\u043f\u0440\u043e\u0441\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c\u201d \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0443 \u043c\u0435\u043d\u044f, \u043d\u043e \u0438 \u0443 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0443 \u0442\u0435\u0445 \u0431\u0435\u0434\u043e\u043b\u0430\u0433, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043a\u043e\u0433\u0434\u0430-\u043b\u0438\u0431\u043e \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u0441\u0435\u0433\u043e. \u0421\u0435\u0439\u0447\u0430\u0441 \u0443\u0436\u0435 \u043d\u0435 \u0432\u0441\u043f\u043e\u043c\u043d\u044e \u043a\u0430\u043a \u044f \u043a \u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u0448\u0435\u043b, \u043d\u043e \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0442\u043e\u0440 \u2014 \u0441\u0435\u0440\u0432\u0438\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u043b\u0441\u044f \u0431\u044b \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0435, \u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0430\u043b \u0431\u044b \u0444\u0438\u043b\u044c\u0442\u0440, \u0437\u0430\u043e\u0434\u043d\u043e \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u043d\u0443\u0436\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b. \u0421\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u0431\u0438\u0437\u043d\u0435\u0441 \u043b\u043e\u0433\u0438\u043a\u0438 \u0442\u044b \u0441\u0442\u0440\u043e\u0438\u0448\u044c \u043e\u0431\u044b\u0447\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u0430 \u043f\u0435\u0440\u0435\u0434 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435\u043c, \u0444\u0438\u043b\u044c\u0442\u0440 \u0434\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0442\u0443\u0434\u0430 \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0431\u0440\u0435\u0436\u0435\u0442 \u0432\u0441\u0435 \u0442\u043e, \u0447\u0442\u043e \u0442\u0435\u0431\u0435 \u0432\u0438\u0434\u0435\u0442\u044c \u043f\u043e \u0441\u0442\u0430\u0442\u0443\u0441\u0443 \u043d\u0435 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043e.<\/p>\n<pre><code class=\"php\">&lt;?php namespace CRMBundle\\Entity\\Filter;  use Doctrine\\ORM\\Mapping\\ClassMetaData; use Doctrine\\ORM\\Query\\Filter\\SQLFilter;  class EntityFilter extends SQLFilter {      public function addFilterConstraint(ClassMetadata $targetEntity, $targetTableAlias)     {         if ($targetEntity-&gt;getName() != 'CRMBundle\\Entity\\Entity') {             return '';         }          try {             $statuses = $this-&gt;getParameter('statuses');         } catch (\\InvalidArgumentException $e) {             return '';         }          if (empty($statuses)) {             return '';         }          $allowedStates = substr($allowedStates, 1, -1);         $allowedStates = str_replace('\\\\', '', $allowedStates);          return $targetTableAlias.&quot;.status in (&quot;.$allowedStates.&quot;)&quot;;     } } <\/code><\/pre>\n<p>  \u0418 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438:  <\/p>\n<pre><code>\/\/ config.yml services:         doctrine.filter.configurator:         class: CRMBundle\\Entity\\Filter\\Configurator         arguments:             - &quot;@doctrine.orm.entity_manager&quot;             - &quot;@security.token_storage&quot;         tags:             - { name: kernel.event_listener, event: kernel.request }  doctrine:     orm:         filters:             entity_filter:                 class: CRMBundle\\Entity\\Filter\\EntityFilter                 enabled: false <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e, \u0432\u044b\u0437\u043e\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <code>$entity-&gt;getChildren();<\/code> \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432 <code>doctrine.DEBUG: SELECT * FROM entity t0 WHERE t0.parent_id = ? AND ((t0.state in ('new', 'in_work'))) [3]<\/code><\/p>\n<p>  \u0422\u0430\u043a \u044f \u0440\u0435\u0448\u0438\u043b \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043d\u0430 \u0447\u0442\u0435\u043d\u0438\u0435. \u0410 \u0434\u043b\u044f \u0432\u0441\u0435\u0433\u043e \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0435\u0441\u0442\u044c <s>mastercard<\/s> <a href=\"http:\/\/symfony.com\/doc\/current\/cookbook\/security\/voters.html\">voters<\/a>. \u042f \u0431\u0443\u0434\u0443 \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u043f\u0440\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 Voters \u0432 Symfony 2.7, \u043d\u043e \u0438\u043c\u0435\u0439\u0442\u0435 \u0432\u0432\u0438\u0434\u0443, \u0447\u0442\u043e \u0432 \u0432\u0435\u0440\u0441\u0438\u0438 2.8 \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u043a\u043b\u0430\u0441\u0441 Voter, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u0442 \u043f\u043e \u0441\u0432\u043e\u0435\u043c\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0443 AbstractVoter, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u044f.<\/p>\n<p>  \u0421\u0430\u043c voter \u2014 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0439:  <\/p>\n<pre><code class=\"php\">&lt;?php namespace CRMBundle\\Security\\Authorization\\Voter;  use Symfony\\Component\\Security\\Core\\Authorization\\Voter\\AbstractVoter; use CRMBundle\\Entity\\User; use Symfony\\Component\\Security\\Core\\User\\UserInterface;  class EntityVoter extends AbstractVoter {     const VIEW = 'view';     const EDIT = 'edit';     const INFO_VIEW = 'info_view';     const INFO_EDIT = 'info_edit';     const ANS_VIEW = 'ans_view';     const ANS_EDIT = 'ans_edit';     const HISTORY = 'history';      protected function getSupportedAttributes()     {         return array(self::VIEW, self::EDIT, self::INFO_VIEW, self::INFO_EDIT, self::ANS_VIEW, self::ANS_EDIT, self::HISTORY);     }      protected function getSupportedClasses()     {         return array('CRMBundle\\Entity\\Entity');     }      protected function isGranted($action, $entity = null, $user = null)     {         if (!$user instanceof UserInterface) {             return false;         }          if (in_array($entity-&gt;getState(), $user-&gt;getAllowedStates($action))) {             return true;         }          return false;     } } <\/code><\/pre>\n<p>  \u0418 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0435\u0433\u043e:  <\/p>\n<pre><code>\/\/ config.yml services:     security.access.entity_voter:         class:      CRMBundle\\Security\\Authorization\\Voter\\EntityVoter         public:     false         tags:             - { name: security.voter } <\/code><\/pre>\n<p>  \u0423 Entity \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0434\u043d\u043e \u0438\u0437 13 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439, \u0438 \u0443 \u043c\u0435\u043d\u044f \u0431\u044b\u043b\u043e 7 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0434\u043e\u0437\u0432\u043e\u043b\u0435\u043d\u0438\u0435. \u042d\u0442\u043e \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u0443\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u043b\u043e\u0441\u044c \u0434\u0430\u0436\u0435 \u0432 64-\u0435\u0445 \u0431\u0438\u0442\u043e\u0432\u044b\u0439 \u0438\u043d\u0442, \u0442\u0430\u043a \u0447\u0442\u043e \u044f \u0441\u0434\u0435\u043b\u0430\u043b \u043f\u043e \u043c\u0430\u0441\u043a\u0435 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0438 \u0434\u043e\u0432\u0435\u0440\u0438\u043b \u0438\u0445 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0440\u043e\u043b\u044f\u043c. \u041f\u043b\u044e\u0441 \u0443 \u043c\u0435\u043d\u044f \u0431\u044b\u043b\u0438 \u0435\u0449\u0435 \u0438 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0438, \u043d\u0435 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u043a Entity, \u0442\u0430\u043a \u0447\u0442\u043e \u0432 \u0441\u0443\u043c\u043c\u0435 \u0443 \u043a\u0430\u0436\u0434\u043e\u0439 \u0440\u043e\u043b\u0438 \u0431\u044b\u043b\u043e \u043f\u043e 8 \u0431\u0438\u0442\u043e\u0432\u044b\u0445 \u043c\u0430\u0441\u043e\u043a. \u0412 \u043c\u0435\u0442\u043e\u0434\u0435 getMask($action) \u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u044f \u0434\u0435\u043b\u0430\u043b \u043f\u043e\u0431\u0438\u0442\u043e\u0432\u043e\u0435 \u201c\u0438\u201d \u0434\u043b\u044f \u043d\u0443\u0436\u043d\u043e\u0439 \u043c\u0430\u0441\u043a\u0438 \u0432\u0441\u0435\u0445 \u0435\u0433\u043e \u0440\u043e\u043b\u0435\u0439. \u041c\u0430\u0441\u043a\u0438 \u043f\u0440\u043e\u0441\u0442\u044b \u043a\u0430\u043a \u043e\u043a\u0440\u0443\u0436\u043d\u043e\u0441\u0442\u044c: 13 \u0431\u0438\u0442\u043e\u0432 \u043e\u0442\u0440\u0430\u0436\u0430\u044e\u0442 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 \u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f, \u0437\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u044d\u0442\u0430 \u043c\u0430\u0441\u043a\u0430 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 13 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439 Entity. \u0422\u0430\u043a, \u044f \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u043c\u0435\u0442\u043e\u0434 getAllowedStates($action), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 $action \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043e.<\/p>\n<pre><code class=\"php\">\/\/ CRMBundle\/Entity\/User.php public function getMask($action) {     $mask = 0;     foreach ($this-&gt;userRoles as $role) {         $mask = $mask | $role-&gt;getMask($action);     }     return $mask; }  public function getAllowedStates($action = 'view') {     $result = [];     $mask = $this-&gt;getMask($action);     foreach (['new', 'in_work', 'etc.'] as $key =&gt; $value) {         if (((1 &lt;&lt; $key) & $mask) != 0) {             $result[] = $value;         }     }      return $result; }  \/\/ controller $this-&gt;denyAccessUnlessGranted('info_view', $entity, '\u041d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u0430\u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u0430!'); <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u043f\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u043c\u0443: \u0432 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0442\u043e\u0447\u043a\u0430\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c \u043a\u0430\u043a \u0441\u043e\u0432\u0435\u0440\u0448\u0438\u0442\u044c \u0434\u0435\u0441\u0442\u0432\u0438\u0435 \u043d\u0430\u0434 Entity, \u0432\u044b \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0435 denyAccessUnlessGranted($action, $entity, $declineMessage), \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0435 \u0432 \u043d\u0435\u0433\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0445\u043e\u0442\u0438\u0442\u0435 \u0441\u043e\u0432\u0435\u0440\u0448\u0438\u0442\u044c, Entity, \u043d\u0430\u0434 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043e \u044d\u0442\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u0432\u0430\u043d Exception \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0442\u043a\u0430\u0437\u0430. \u0412\u043e\u0442 \u0442\u0430\u043a \u043f\u0440\u043e\u0441\u0442\u043e. \u041a\u043e\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442\u0435 \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 voter, \u0443\u043a\u0430\u0436\u0435\u0442\u0435 \u043a\u0430\u043a\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0438 \u043d\u0430\u0434 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u043a\u0430\u043a\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u043e\u043d \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442. \u0412\u043d\u0443\u0442\u0440\u0438 voter \u0435\u0441\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0445\u043e\u0447\u0435\u0442 \u0434\u0435\u043b\u0430\u0442\u044c $action \u0441 $enitity. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0435\u0441\u0442\u044c \u0432\u0441\u0435, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e, \u0438 \u043c\u043d\u0435 \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043d\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f $entity \u0432 \u043e\u0442\u0432\u0435\u0442\u0435 getAllowedStates($action) \u0443 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442.               <\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/273477\/\"> http:\/\/habrahabr.ru\/post\/273477\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       \u0412\u0441\u0435 \u043d\u0430\u0447\u0430\u043b\u043e\u0441\u044c, \u043a\u043e\u0433\u0434\u0430 \u044f \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043b \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u043e\u0434\u043d\u043e\u0439 CRM. \u041a\u0430\u043a \u044d\u0442\u043e \u0447\u0430\u0441\u0442\u043e \u0431\u044b\u0432\u0430\u0435\u0442, \u0432 \u043d\u0435\u0439 \u0431\u044b\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0443\u0440\u043e\u0432\u043d\u044f\u043c\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u043c \u0434\u0430\u043d\u043d\u044b\u043c (\u043d\u0430\u0437\u043e\u0432\u0435\u043c \u0438\u0445 entities ;)). \u0412\u0438\u0434 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u0433\u0440\u0438\u0434\u0430 \u0443 \u043d\u0438\u0445 \u0431\u044b\u043b \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0439, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0430 \u0431\u044b\u043b\u0430 \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a entities. \u0421\u043f\u0435\u0440\u0432\u0430 \u044f \u043f\u043e\u0434\u0443\u043c\u0430\u043b \u043e\u0431 ACL, \u043d\u043e\u2026  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-270677","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/270677","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=270677"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/270677\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=270677"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=270677"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=270677"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}