| 427 | | >Remember that the `propel:build-all-load` task removes all existing tables |
|---|
| 428 | | </propel> |
|---|
| 429 | | <doctrine> |
|---|
| 430 | | >Remember that the `doctrine:build-all-reload` task removes all existing tables |
|---|
| 431 | | </doctrine> |
|---|
| 432 | | >before re-creating them. To avoid this, you can build the models, forms, and |
|---|
| 433 | | >filters, and then, create the new tables by executing the generated SQL |
|---|
| 434 | | >statements stored in `data/sql/`. |
|---|
| 435 | | |
|---|
| 436 | | As always, when new classes are created, you need to clear the symfony ~cache|Cache~: |
|---|
| | 423 | >������ `propel:build-all-load` ���� ������ |
|---|
| | 424 | </propel> |
|---|
| | 425 | <doctrine> |
|---|
| | 426 | >������ `doctrine:build-all-reload` ���� ������ |
|---|
| | 427 | </doctrine> |
|---|
| | 428 | >��� � �� ����� ����� �� �� �����, ���� ����� ������������QL-�����>���� ����data/sql/`. |
|---|
| | 429 | |
|---|
| | 430 | ���������������� ���Symfony: |
|---|
| 441 | | As `sfGuardPlugin` adds several methods to the user class, you need to change |
|---|
| 442 | | the base class of `myUser` to `sfGuardSecurityUser`: |
|---|
| 443 | | </propel> |
|---|
| 444 | | <doctrine> |
|---|
| 445 | | As `sfDoctrineGuardPlugin` adds several methods to the user class, you need to |
|---|
| 446 | | change the base class of `myUser` to `sfGuardSecurityUser`: |
|---|
| | 435 | ���� `sfGuardPlugin` �������� ��� �����, ��� ����� ���`myUser` �`sfGuardSecurityUser`: |
|---|
| | 436 | </propel> |
|---|
| | 437 | <doctrine> |
|---|
| | 438 | ���� `sfDoctrineGuardPlugin` �������� ��� �����, ��� ����� ���`myUser` �`sfGuardSecurityUser`: |
|---|
| 525 | | >To list all routes provided by `sfGuardPlugin`, use the `app:routes` task. |
|---|
| 526 | | |
|---|
| 527 | | To polish the Jobeet backend even more, let's add a new module to manage the |
|---|
| 528 | | administrator users. Thankfully, `sfGuardPlugin` provides such a module. As |
|---|
| 529 | | for the `sfGuardAuth` module, you need to enable it in `settings.yml`: |
|---|
| | 516 | <propel> |
|---|
| | 517 | >�� �� � ��, ����fGuardPlugin`, ������app:routes`. |
|---|
| | 518 | </propel> |
|---|
| | 519 | <doctrine> |
|---|
| | 520 | >�� �� � ��, ����fDoctrineGuardPlugin`, ������app:routes`. |
|---|
| | 521 | </doctrine> |
|---|
| | 522 | |
|---|
| | 523 | <propel> |
|---|
| | 524 | �� � �������Jobeet, ����� ������� ���� ������`sfGuardPlugin` ��������� |
|---|
| | 525 | ���� ����`sfGuardAuth`, ��� �������settings.yml`: |
|---|
| | 526 | </propel> |
|---|
| | 527 | <doctrine> |
|---|
| | 528 | �� � �������Jobeet, ����� ������� ���� ������`sfDoctrineGuardPlugin` ��������� |
|---|
| | 529 | ���� ����`sfGuardAuth`, ��� �������settings.yml`: |
|---|
| | 530 | </doctrine> |
|---|
| 543 | |  |
|---|
| 544 | | |
|---|
| 545 | | We are done! |
|---|
| 546 | | |
|---|
| 547 | | User Testing |
|---|
| 548 | | ------------ |
|---|
| 549 | | |
|---|
| 550 | | Today's tutorial is not over as we have not yet talked about user testing. |
|---|
| 551 | | As the symfony browser simulates ~cookies|Cookies~, it is quite easy to test user |
|---|
| 552 | | behaviors by using the built-in |
|---|
| 553 | | [`sfTesterUser`](http://symfony-project.org/api/1_2/sfTesterUser) tester. |
|---|
| 554 | | |
|---|
| 555 | | Let's update the ~functional tests|Functional Testing~ for the menu feature we |
|---|
| 556 | | have added today. |
|---|
| 557 | | Add the following code at the end of the `job` module functional tests: |
|---|
| | 544 | . |
|---|
| | 553 | |
|---|
| | 554 | ����� ���� �� ����, ���� �����. |
|---|
| | 555 | ��������������������`job`: |
|---|
| 589 | | >The `sfTesterUser` tester also provides `isAuthenticated()` and |
|---|
| 590 | | >`hasCredential()` methods to test user authentication and autorizations. |
|---|
| 591 | | |
|---|
| 592 | | See you Tomorrow |
|---|
| 593 | | ---------------- |
|---|
| 594 | | |
|---|
| 595 | | The symfony user classes are a nice way to abstract the PHP session |
|---|
| 596 | | management. Coupled with the great symfony plugin system and the |
|---|
| 597 | | `sfGuardPlugin` plugin, we have been able to secure the Jobeet backend in a |
|---|
| 598 | | matter of minutes. And we have even added a clean interface to manage our |
|---|
| 599 | | administrator users for free, thanks to the modules provided by the plugin. |
|---|
| | 586 | >�� `sfTesterUser` ������� `isAuthenticated()` �`hasCredential()`, ��������� �������. |
|---|
| | 587 | |
|---|
| | 588 | ��� ��--------------- |
|---|
| | 589 | |
|---|
| | 590 | ��� �� ����Symfony - ��� ������� |
|---|
| | 591 | ��� PHP-��. ��� ���� ������ymfony ����propel> |
|---|
| | 592 | `sfGuardPlugin`, |
|---|
| | 593 | </propel> |
|---|
| | 594 | <doctrine> |
|---|
| | 595 | `sfDoctrineGuardPlugin`, |
|---|
| | 596 | </doctrine> |
|---|
| | 597 | ����� �����Jobeet ���������� |
|---|
| | 598 | ������ ��� ��� � ����������� ��, |
|---|
| | 599 | �������. |
|---|