Fabrik form menu item issue

gnavarro

Member
Hi,

My config:
Fabrik 3.5.1
Joomla! 3.6.2
Template - Protostar
Updated from github
Access to site admin in my Fabrik account

To debug this one you need to login my site using "My Sites" / "FisioLAR COLAB"

The following Fabrik form menu item is directing to the details instead form:
http://www.fisiolar.pt/administrator/index.php?option=com_menus&view=item&layout=edit&id=315

I have in the menu item Fabrik form options:
row id = -1
key name = user_id

This is all correct and used to work!

Test the link with http://www.fisiolar.pt/index.php/pt/perfil-do-utilizador/editar-candidatura/details/3/

Am I missing something? Please advise.
 
Last edited:
OK, that user can't edit the form, because you have the "Edit" access (in the list's "access" tab) set to the "Secretariado" access level, and the user in question isn't a member of a group which is in that access level. So they can't edit it. So they get redirected to the details view.

-- hugh
 
Yes... But than I have "or use field" with the user ID element defined. Nevertheless I have already changed the edit access to "colaboradores" that is the correct user group and the form continues to redirect to detail view.

Hugh, believe me something is definitely wrong... Please take a look again now that I have set the correct user group for the list edit access. Thanks

Sent using Tapatalk
 
OK ... both the user_id element itself, and the group it is in (id 12) have 'view details' access levels set to "Secratariado" (and add/edit set to "Special").

So because your list access has the "user element" control, and because that element can't be accessed at all (it's not even included in the form's getData() query, because the logged on user simply isn't allowed access to it, period)), the canUserDo() method was returning "false", which overrides the regular view access level setting for "edit rows".

This is kind of a special case. If the "use element" element is accessible, but is not the logged on userid, the canUserDo() method won't return true/false, and the access decision will be made by the "can edit" view level. But if the element isn't available (because the element and/or group access don't allow it to be read), canUserDo() will return false, overriding any other access controls.

So ... on my copy here, I set the "Details view" access on the element and the access level on that group to "Colaboradores | Secartariado". It then works.

Bottom line - you had told Fabrik to use user_id to make the access control decision, but had denied access to that element and the group it was in.

-- hugh
 
It's strange because I've the impression that it worked in the past with the user element in an group without permissions but at the same time if the user loses access to it makes sense the impossibility to edit the form. The important is that is working.

Thanks for the solution Hugh.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top