Problem/Motivation

When quantities and log records are added via JSON:API it should be possible to add a quantity, then add a log and assign the quantity too it. That is currently not possible because farm_multitenant_query_quantity_access_alter() does not allow the user to access a quantity or log that is not associated with a farm that the user is a member of.

Proposed resolution

In hook_query_TAG_alter implementations we allow access if the user has administer farm_multitenant. We should also allow access to users with the administer entity type permission, e.g. administer quantity in farm_multitenant_query_quantity_access_alter() and administer log in farm_multitenant_query_log_access_alter()

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

peacog created an issue. See original summary.

  • e948cd1f committed on 1.0.x
    Issue #3549929: Allow access to farm entities if user has administer...
peacog’s picture

Status: Active » Fixed

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.