Autocomplete permission

Open
#7,795 0 comments 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
php, symfony

Research direction

Start by tracing the shown autocomplete permission check and compare it with the existing index permission handling. Identify where these permissions are defined and exercised; done means autocomplete can be granted independently while index access remains restricted.

Written by the indexing model from the issue text.

Description

The permissions required to access autocomplete are the same as those required to access the index. There should be a dedicated permission for autocomplete.

// not a typo; we intentionally reuse the INDEX action for permission checks in autocomplete
if (!$this->isGranted(Permission::EA_EXECUTE_ACTION, ['action' => Action::INDEX, 'entity' => null, 'entityFqcn' => $context->getEntity()->getFqcn()])) {
    throw new ForbiddenActionException($context);
}

Example:

User 1 is allowed to administer the entity (and therefore has access to the index).

User 2 should be allowed to use the entity through autocomplete without being able to access the index.

Dominant language
PHP
Stars
4.3k
Forks
1.1k
Avg merge
2d 9h
Merged PRs (30d)
52

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from EasyCorp/EasyAdminBundle

All issues in EasyCorp/EasyAdminBundle

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.