Merge of branch add_acl
Squashed commit of the following:
commit a3265a71014fc74bcc456aa9436494fc4ed434ea
Merge: 2522634 b231b14
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Tue Jun 30 09:58:23 2015 +0200
Merge remote-tracking branch 'origin/master' into add_acl
in order to future merging of add_acl into master
Conflicts:
Tests/Controller/PersonControllerCreateTest.php
commit 252263400b1fb54091a0cd36d9ab84812c3a9942
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Mon Jun 29 23:00:25 2015 +0200
check acl on timeline page
commit 5f08806585ce4ce1d58c6c507b191221b924d861
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Fri Jun 19 22:24:18 2015 +0200
remove dead code
commit 860d62d9c0d9db2186eee725e7ef553ddf1f98f3
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Fri Jun 19 22:19:02 2015 +0200
add access condition for link to person view in person view
commit e7b295000dd420309288e83920f6656679d36173
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Fri Jun 19 22:13:04 2015 +0200
add ACL on person view
commit 7b1f90a2a28c1aec5ee0eb78206c75a9f1e09c60
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Fri Jun 19 21:47:49 2015 +0200
add autorization for filtering person results in search
commit c6669164e2e36b555bed0745d5c7c12b53468b97
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Fri Jun 19 21:47:26 2015 +0200
add fixtures for roles defined by person bundle
commit 8f30f5222efe531fb77a2e22b6af8069c5814d00
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Fri Jun 19 20:13:17 2015 +0200
[transfer purpose][ci-skip]
commit e8ca4ce4842e619342a90d4343b725c2946f7d70
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Fri Jun 19 17:31:27 2015 +0200
should fix reference problem
commit 8c32524a0fd61d504e9640705b97d10bd9b2b993
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Fri Jun 19 17:29:48 2015 +0200
fix test about inheritance
commit d93cef2c596aba7fc977cc8db354241d6a77e6e2
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Thu Jun 18 21:38:59 2015 +0200
add role hierarchy + test
commit 5066cc5318d67f20e3cff9f91f6d2b6a94d5f9c1
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Thu Jun 18 01:28:40 2015 +0200
add tests for person voter
commit cf3359b11b16972db3c55102a3c8b2aae2c27789
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Thu Jun 18 01:07:30 2015 +0200
fix "pass by reference" error
commit 94942eb34330813a10124ba58ec814ca685930c5
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Wed Jun 17 22:04:49 2015 +0200
fix syntax error ($this->$is not correct)
commit 82d25df6b0e21b4032f4fc82dee203ccd1a067dd
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Wed Jun 17 21:51:41 2015 +0200
add first test for person voter
commit 84e0d05be07477175db1ef95f3716a3c420291ce
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Wed Jun 17 21:50:06 2015 +0200
define person voter as a service + CHILL_PERSON_SEE
commit bd55e505a179b0df4133903f766d9a8feb469900
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Tue Jun 16 20:57:25 2015 +0200
add test for creating person with user multi center
commit d29147c8e70b2ae8313d973fe4b3d45d3f064d9b
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Mon Jun 15 09:11:56 2015 +0200
fix tests - add center to persons
since a center is associated with center, people used in tests must be associated with a center.
=> associate a center to people used in tests
commit cfac1ea68aaf615b5f8e9e67388f5407e5095d72
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Mon Jun 15 09:06:24 2015 +0200
remove errors on deprecation
commit e1df87df87e831f3827721313603bcf41b3da891
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Fri Jun 12 22:31:03 2015 +0200
fix migration error
commit 733fa96a2d874b84d2a0ece6664e4a64eed10b4d
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Wed Jun 10 21:17:15 2015 +0200
add center type on creation forms
tests are not adapted yet [ci skip]
commit c0d1d1b1c8fd58d9c15bf59d66de28a848df6d35
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Tue Jun 9 23:11:07 2015 +0200
fix bug in migration
commit 693abfb7253dfe955beb63de3aebc05a15363cdb
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Tue Jun 9 22:41:21 2015 +0200
add checks on migration
check that there are data or not in database and, if there are data,
create default center if required.
If not required, the default center is the first in the list.
commit 8127ea8d49e094c81ce65e838416953bc8d47678
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Mon Jun 8 00:33:39 2015 +0200
add first impl of PersonVoter (not tested) [ci skip]
commit 2ea674dbcf8848603f0fefa109abf2412722013f
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Mon Jun 8 00:32:46 2015 +0200
add center to person
commit 0b1e3f137ace9eeb959b80cdbdfa3636c75af715
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Sat Jun 6 11:02:49 2015 +0200
add phpunit bridge to handle deprecation msg
commit 70a4fd16181badad8ac9b87fd24e1000c7b1a734
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Fri Jun 5 12:42:01 2015 +0200
remove deprecdation warning in phpunit
commit b3b8d1deefbdc72505606df7ca217771277e3555
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Fri Jun 5 11:41:36 2015 +0200
fix deprecation of pattern in routing
pattern => path in routing.yml
commit eea1252d8517ee582c958dc6045f05c1438dd9d1
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Fri Jun 5 10:56:02 2015 +0200
switch to symfony 2.7 [ci-skip]
Squashed commit of the following:
commit e1236655e1514fd207818aeb57789eca0d949453
Merge: c0b349b fb15bd3
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Tue Jun 30 09:51:35 2015 +0200
Merge remote-tracking branch 'origin/master' into add_acl
In order to prepare merging of add_acl to master
Conflicts:
composer.json
commit c0b349bb5f31fe79c84f82d4dd6658c9e90ef728
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Tue Jun 30 00:40:13 2015 +0200
fix infos in composer.json
[ci skip]
commit 106bbf56a5060efd2a89232f278692eeb57e3092
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Mon Jun 29 22:58:48 2015 +0200
add username and password to client auth options
[ci skip]
commit c4990972711850616aa1426394884223d63b504f
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Mon Jun 29 22:22:20 2015 +0200
fix quoting in timelinebuilder
commit 1db7cbea5a0fb0e8d396f8c9d8dc01240b47e96f
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Thu Jun 25 22:43:46 2015 +0200
remove data_class to allow edit form
commit 7c999279310b5e2b9ecef8a9b5001c71910a822d
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Wed Jun 24 22:33:42 2015 +0200
fix doc for AppendScopeChoiceTypeTrait
commit 839d4c43bf6f463e705b47d5dbc0cdf7853db0b6
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Wed Jun 24 22:30:13 2015 +0200
refactor: move scope field to a trait
Example usage :
```
class AbcType extends Symfony\Component\Form\AbstractType
{
use AppendScopeChoiceTypeTrait;
protected $authorizationHelper;
protected $translatableStringHelper;
protected $user;
public function __construct(AuthorizationHelper $helper,
TokenStorageInterface $tokenStorage,
TranslatableStringHelper $translatableStringHelper)
{
$this->authorizationHelper = $helper;
$this->user = $tokenStorage->getToken()->getUser();
$this->translatableStringHelper = $translatableStringHelper;
}
public function buildForm(FormBuilder $builder, array $options)
{
// ... add your form there
// append the scope using FormEvents: PRE_SET_DATA
$this->appendScopeChoices($builder, $options['role'],
$options['center'], $this->user,
$this->authorizationHelper,
$this->translatableStringHelper);
}
public function configureOptions(OptionsResolver $resolver)
{
// ... add your options
// add an option 'role' and 'center' to your form (optional)
$this->appendScopeChoicesOptions($resolver);
}
}
```
[ci skip]
commit a1ac530f343146eee12b5982e4e6fceb6dc1da66
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Wed Jun 24 00:24:30 2015 +0200
remove unused statements
commit 74f0a4ce5dfdfa4f8fc39ce1cfe726d945e9bdec
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Wed Jun 24 00:09:47 2015 +0200
add missing unused statement
commit b3a49f2de8758b51c57af6ff0437f30b2fdef72e
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Tue Jun 23 23:58:57 2015 +0200
remove ScopeType strategy and fix autorization helper
commit aaa70b5eeae76b0950110f51b8274e08bef10576
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Tue Jun 23 21:35:06 2015 +0200
create scope type
commit 8f5b2b23c9448b8c8e752e46bdd7f9f721054a98
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Fri Jun 19 18:13:54 2015 +0200
add getREachableCenter method + test on Autho.Helper
commit ab2ccb8c287f9aef12912ea9b7f5dc4998209d77
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Fri Jun 19 17:27:22 2015 +0200
remove debug information [ci skip]
commit 9d481c07966a5d769d1418bb366bd6b1ea9d4f76
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Fri Jun 19 17:24:57 2015 +0200
fix role hierarchy
Now we test effectively that a user has access, not that a role may grant access
commit f4b17d0ae398fd6c26d4907377761e9f15d36a90
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Thu Jun 18 02:08:55 2015 +0200
fix trait conflicts
traits does not share the same instance of prophet any more
commit baac8ce97ba0acd4c4fe6f03278f7a0d30da28ad
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Thu Jun 18 01:56:39 2015 +0200
try to fix trait error in zend strict mode (used by travis)
commit 7b9fa4b14bde72c7036a29c03a0c6cca3c7e6c74
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Thu Jun 18 01:24:09 2015 +0200
fix error on trait hierarchy (should be)
commit f8b3451089f7017653bf8d280b640356df6a1841
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Thu Jun 18 01:03:04 2015 +0200
add userHasAccess method to AuthorizationHelper
This method may be used in voter to check access.
It supports both hasCenterInterface and HasScopeInterface and check all
required permission.
commit 9ad9f624a0aa73ca2e639fd68fe4d5559da2bbd7
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Thu Jun 18 01:01:16 2015 +0200
add utilities to generate prophesized entities
entities
- User (with permissions)
- Center
- Scope
may be generated by trait/methods
This ease test writing about acl
commit 16008b9e64bb7f551319abea494db1c1c5a12b82
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Fri Jun 12 22:42:46 2015 +0200
add test to CenterType
commit 55e2c64aba9714caf09df8dbc9595980826b296a
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Fri Jun 12 20:50:05 2015 +0200
first implementation of test on CenterType
[TRANSFER][ci skip]
commit 548fb24927cc470794a51d81f1ba6af52237363f
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Wed Jun 10 21:15:52 2015 +0200
add center type
the center type is hidden if the current user can reach only one center,
and is `entity` type if the user can reach multiple centers
commit 024e3ef8d969d25560406864d86768a260ef4402
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Mon Jun 8 00:28:51 2015 +0200
add first impl of Access Model
- first classes and interfaces
- authorizationHelper + test
- rewrite loadUser to have multi-center
commit bc5ae70c83c39a0a738e78313e33020fc284f456
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Sun Jun 7 22:11:13 2015 +0200
make deprecations message not fail tests
commit ab9308ed62e45171e9d355ec033b0862b9274e07
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Sat Jun 6 10:19:19 2015 +0200
introducting phpunit-bridge to handle deprecation warnings
commit 5b7a43c4d058af58578c30120670c5be5b11cfd8
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Fri Jun 5 12:49:23 2015 +0200
fix options resolver deprecation
commit a5b4e5743f790c16dfd04e5068c5ecca9c2b1583
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Fri Jun 5 12:36:17 2015 +0200
remove warning about deprecation in phpunit
commit 56621767936df1ea1293c49ae06380d7735c8d6c
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Fri Jun 5 11:59:50 2015 +0200
fix pattern deprecation in routing/test
pattern=> path
commit 17d40fc5294b245d7377572a8c918abab2484985
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Fri Jun 5 11:40:59 2015 +0200
fix deprecation of pattern in routing
pattern => path in routing
commit 6a33752c6439bd9dbc707df010ce1d8765eeb5fe
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Fri Jun 5 11:21:18 2015 +0200
fix twig.form.resources deprecation
the new key is twig.form_themes
commit adf03eb819f2d443f87d7b744f59a5adf51d2b31
Author: Julien Fastré <julien.fastre@champs-libres.coop>
Date: Fri Jun 5 10:56:51 2015 +0200
switch to symfony 2.7 [ci-skip]