cubicweb #2341579 uicfg auto form section not working properly for some object relation and non admin users [rejected]

For example, following works (displays a "+ add Folder" link on default Folder edit view) :

_afs.tag_subject_of(('Folder', 'filed_under', 'Folder'), 'main', 'inlined')

but this does'nt (no such link appears) :

_afs.tag_object_of(('Folder', 'filed_under', 'Folder'), 'main', 'inlined')

After digging into it, it seems related to the permissions : when AutomaticEntityForm.inlined_form_views checks 'add' permission, it gets True for the tag_subject_of case but False for the tag_object_of case. More precisely, the 'add' permission of the two cases differs when evaluating following RRQLExpression (for non admin users) :

RRQLExpression(Any S,U WHERE U has_update_permission S, S eid %(s)s, U eid %(u)s)

with kwargs :

{'from_eid': [MY_EDITED_FOLDER_EID]} # in the tag_subject_of (working) case

{'to_eid': [MY_EDITED_FOLDER_EID]} # in the tag_object_of (not behaving properly) case

Now I do not succeed solving this problem in a reasonnable amount of time because of my lack of knowledge of the way RQLRewriter handles the special 'has_update_permission' relation... help would be greatly appreciated !

done in<not specified>
load left0.000
closed by<not specified>