symfony/symfony — Issue #3136: Retrieving available fields from (Mutable)AclInterface
Author: havvg
Created: 2012-01-17 14:17:03+00:00
State: open

I'm implementing the `MutableAclInterface` and `MutableAclProviderInterface` **separated** from there immutable counterparts. Right now I'm stuck with the question on **how to retrieve the available fields an ACL provides (both class and object based)?**

## Explanation

The question rises when implementing the `MutableAclProviderInterface::updateAcl()`, since there may be new `FieldEntry` given on that `MutableAcl` to be persisted, but the `MutableAclInterface` (extending the `AclInterface`) does not provide a method to retrieve the list of fields available.
The only methods available are `getClassFieldAces($field)` and `getObjectFieldAces($field)` where the provider already needs to know the existing fields or the other way around it would be required to know the domain object - both shouldn't be the case.

## Suggestion

Adding `AclInterface::getFields()` returning an array of string, the currently associated fields. The returned list does not represent the complete list of fields available on the domain object/class, but only those used/known by the acl.