Hi,

I've been trying to understand the inner workings of limesurvey_sync 2.x and it appears that sometimes function limesurvey_sync_api_entity_entity_access is called for token entities, and there are tests for fields that don't exist for this entity (e.g., user and status). Also, if I am understanding correctly, it is invoked without an entity parameter, so tests for fields of that entity fail.

Also, $entity_info['bundles'] has data, but $entity_info['entity keys']['bundle'] appears to be null, at least when call for tokens.

Unfortunately, I don't understand enough yet to say more, but the response and survey entities seem to be the only entity limesurvey entities that have uid as a field and only response seems to have status as a field.

I'm sorry if I'm misunderstanding something, but hoping this might be helpful.

Comments

jsibley created an issue. See original summary.

thedut’s picture

Assigned: Unassigned » thedut
Status: Active » Closed (works as designed)

Hello Jibsey

The code in the limesurvey_sync_api_entity_entity_access() function looks good to me.
read line 1985 and 1989 : access is fired depending on the entity contains (or not contain) the status or author property.
Report if you find an issue using this function.
The LimeSurvey module defined a new php class in the api/limesurvey_sync_api_entity.class.inc file that create and manage entities, like ECK but in a more powerfull way in code.

thedut’s picture

Title: Issues with limesurvey_sync_api_entity_entity_access in limesurvey_sync_api_entity.class.inc » access denied for non admin users on LS entities
Status: Closed (works as designed) » Fixed

The Status property was not initialized. It is fixed now.

jsibley’s picture

Thank you!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.