Actions

BeforeHasPermission: Difference between revisions

From LimeSurvey Manual

(Add beforeHasPermission page)
 
mNo edit summary
 
Line 11: Line 11:
* ''iEntityID'' The entity ID (sid for survey, 0 for template, 0 or null for all)
* ''iEntityID'' The entity ID (sid for survey, 0 for template, 0 or null for all)
* ''sEntityName'' Entity : global, survey, template ...
* ''sEntityName'' Entity : global, survey, template ...
* ''sPermission' Name of the permission, example : activate, surveycontent... For template : the template name.
* ''sPermission'' Name of the permission, example : activate, surveycontent... For template : the template name.
* ''sCRUD'' the permission : by default in core can be : 'create','read','update','delete','import' or 'export'  
* ''sCRUD'' the permission : by default in core can be : 'create','read','update','delete','import' or 'export'  
* ''iUserID'' the user id, if is null : actual user
* ''iUserID'' the user id, if is null : actual user

Latest revision as of 18:52, 29 May 2014

 Hint: This features is available starting in version 2.06


When

This event is fired just before a permission is tested.

Input

The event receives the following information:

  • iEntityID The entity ID (sid for survey, 0 for template, 0 or null for all)
  • sEntityName Entity : global, survey, template ...
  • sPermission Name of the permission, example : activate, surveycontent... For template : the template name.
  • sCRUD the permission : by default in core can be : 'create','read','update','delete','import' or 'export'
  • iUserID the user id, if is null : actual user


Possible output

  • bPermission The permission to be returned (boolean). If null, LimeSurvey default permission is tested