FieldDto should be aware about EntityDto to which it is applied.
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Domain
- authorization, backend
Research direction
Start by locating the FieldDto and EntityDto definitions and tracing processFieldsForAll(), where FieldCollection is cloned per entity. Determine how FieldDto could retain the relevant EntityDto or entity for Symfony ACL integration. Done means the association is available to object-identity retrieval without breaking existing field processing; no test or file path is named in the issue.
Written by the indexing model from the issue text.
Description
Short description of what this feature will allow to do:
It would be great if FieldDto would be aware about EntityDto
public function processFieldsForAll(EntityCollection $entities, FieldCollection $fields): void
{
foreach ($entities as $entity) {
$this->processFields($entity, clone $fields);
$entities->set($entity);
}
}
EA already doing clone of FieldCollection, so it's a unique set per entity
Example of how to use this feature
I'm working on integrating https://github.com/symfony/acl-bundle into my project and want to deny/allow accesses based on ACL object.
In order to do I need to implement custom ObjectIdentityRetrievalStrategy (acl class) to retrieve "real entity" and not DTO.
class EasyAdminObjectIdentityRetrievalStrategy extends ObjectIdentityRetrievalStrategy
{
public function getObjectIdentity($domainObject)
{
if ($domainObject instanceof EntityDto && $domainObject->getInstance() !== null) {
return parent::getObjectIdentity($domainObject->getInstance());
} elseif ($domainObject instanceof FieldDto && $domainObject->get) {
}
return parent::getObjectIdentity($domainObject);
}
}
but FieldDto does not have such any association with EntityDto or entity itself.
- Dominant language
- PHP
- Stars
- 4.3k
- Forks
- 1.1k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 52
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from EasyCorp/EasyAdminBundle
-
bug design
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
EasyCorp/EasyAdminBundle#7958 ·
Maintainers usually reply within 2 days
-
design feature
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
EasyCorp/EasyAdminBundle#7930 ·
Maintainers usually reply within 2 days
-
design
Difficulty 2/5 Under an hour Newbie friendliness 88/100
EasyCorp/EasyAdminBundle#7879 ·
Maintainers usually reply within 2 days
-
design
Difficulty 1/5 Under an hour Newbie friendliness 90/100
EasyCorp/EasyAdminBundle#7875 ·
Maintainers usually reply within 2 days
-
#[AdminRoute]: the requirements of an action silently replace the ones of the classPossibly taken @anthonyhacart claimed this 1 day ago. Openfeature
Difficulty 3/5 Half a day Newbie friendliness 30/100
EasyCorp/EasyAdminBundle#7956 ·
Maintainers usually reply within 2 days
All issues in EasyCorp/EasyAdminBundle
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
taskforcesh/bullmq#5238 ·
Maintainers usually reply within 1 day
-
[Bug] v-change-database-password reports success but doesn't change the password when MySQL validate_password rejects itPossibly taken @bfs2021 claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Automattic/jetpack#55517 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
area/import type/enhancement when/later
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Maintainers usually reply within 1 day