OroCRM Forums

Covering OroCRM topics, including community updates and company announcements.

Forums Forums OroCRM OroCRM – Programming Questions ACL/datagrid issue

This topic contains 1 reply, has 1 voice, and was last updated by  Michal Matusiak 6 years, 7 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #25483

    Michal Matusiak
    Participant

    Hi,

    I have a trouble rendering a datagrid and select options even though IMO I’ve set up everything just fine.

    I wrote a Survey Bundle that allows users to create surveys and fill them in on custom Customer view. The entity and all survey-related actions are ACL-protected and everything works fine except two cases:

    1) datagrids protected by ‘vendor_survey_view’ show no results even though there are records in DB and user has proper access rights. Here is some code:

    Entity:

    Controller:

    Template:

    Datagrid:

    This all together allows me to go the the view, create a survey but after that nothing shows in the datagrid. If I delete the ACL annotation of entity and update the configuration, datagrid renders properly but then it’s not ACL-protected and it’s not the result I want. I checked the query in profiler and it looks like that:

    I see why there are no results returned but where did ‘WHERE 1=0’ come from?

    2) in another action of the same controller, called on Customer view, I create a popup with select filled with Surveys; without ACL it renders properly but after enabling it in entity’s annotation it’s empty. Code:

    Controller:

    Template:

    This is even more surprising as I don’t check the access rights to Survey in this action.

    Any ideas? Is my code wrong or did I miss something in the configuration?

Viewing 1 replies (of 1 total)
  • Author
    Replies
  • #25484

    Michal Matusiak
    Participant

    Solved. I was missing the organization property and

    in the entity config.

Viewing 1 replies (of 1 total)

The forum ‘OroCRM – Programming Questions’ is closed to new topics and replies.

Back to top