With Selected dropdown and actions for Related Items

Post Reply
antevasin
Posts: 126
Joined: 24 Mar 2020, 08:57
Name: Spencer Crocker
Location: Corby, UK
Company Name: Unicloud
Contact:

With Selected dropdown and actions for Related Items

Post by antevasin »

Issue is with includes/classes/related_records.php file lines 196 - 214.
The code that decides whether to show the With Selected dropdown and therefore any automated actions for with selected requires that the logged on user HAS to have update access to the main entity which has the related items field set. (the if statment on line 174). And we don't always want to do that. We want to set access via the automated actions.

To explain I have recreated it in this demo. If you view the following logged on as user manager then you can
https://pdemo.rukovoditel.pro/3.2/index ... mo_id=1779
The Manager user can see the related Projects
forum.png
but not the with selected dropdown and the two automated actions created for Projects
actions.png
It seems to me that the code block 196 - 214 should not be in the if { } block but outside it as access to the menu is set via line 197 $this->field_has_button('with_selected') function call
User avatar
support
Site Admin
Posts: 6231
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: With Selected dropdown and actions for Related Items

Post by support »

Yes, you are right. File from archive replace to includes\classes\
In Process button should be visible if user have access to button even there is no Update access to the main Entity.
Let me know if it works ok now.
Attachments
related_records.zip
(5.08 KiB) Downloaded 20 times
enishemed
Posts: 653
Joined: 30 Oct 2017, 11:24
Name: Enis Hemedoglu
Location: Istanbul, Turkey
Company Name: SCORE DANISMANLIK
Contact:

Re: With Selected dropdown and actions for Related Items

Post by enishemed »

Have the same problem for the followings.

1. The user has access to process button, and button place is "in listing" or "with selected". If the user does not have "export selected" access in general access configuration, he can not execute the process because there are no checkboxs in table list for items.

2. The user has access to "templates to export" and "export selected" templates., and button place is "in listing", "with selected" or "export button". If the user does not have "export selected" access in general access configuration, he can not execute the button because there are no checkboxs in table list for items.

These are not about related items, they are common problems for all entities.
Post Reply