Forums

Covering OroCRM topics, including community updates and company announcements.  Subscribe

This topic contains 1 reply, has 1 voice, and was last updated by  Michal Matusiak 2 months, 1 week ago.

  • Creator
    Topic
  • #39122

    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
  • #39130

    Michal Matusiak
    Participant

    Solved. I was missing the organization property and

    in the entity config.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.

ssossossosso