Jump to content


Error in clicking View button in setRelation with Where Condition and setPrimaryKey

User doesnt have access GroceryCRUD Enterprise setRelation Where Condition setPrimaryKey

  • Please log in to reply
1 reply to this topic

#1 larasmith

larasmith

    Advanced Member

  • Members
  • PipPipPip
  • 199 posts
  • LocationPhilippines

Posted 11 July 2018 - 08:43 AM

Dear @web-johnny 

 

I created a setRelation with Where condition. It works properly and displays the needed data but when I click the view button it throws an error. Refer to the image below:

Either_the_user_doesn_t_have_access.png

 

This is the code:

	$crud->setPrimaryKey('gsm_FlId', 'gsm');
	$crud->setRelation('midrep_FLId', 'gsm', '{gsm_Section} ~ {gsm_Course}', ['gsm.gsm_UserId' => $_SESSION('user_ID')]);

Is it a bug? Is there a fix or any workaround for it?

 

Please help. Thanks!



#2 larasmith

larasmith

    Advanced Member

  • Members
  • PipPipPip
  • 199 posts
  • LocationPhilippines

Posted 12 July 2018 - 03:40 AM

Dear @web-johnny 

 

Another update in this issue... I tried it in another module that I was developing and the Edit throws the same error as well.  :(  :(  :(

 

I observed that it works once the where condition in the setRelation was removed. But in my situation the where condition is critical for filtering specific data.
 
I hope this bug gets fixed soon.
 
Thanks!
Lara






Also tagged with one or more of these keywords: User doesnt have access, GroceryCRUD Enterprise, setRelation Where Condition, setPrimaryKey

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users