Dependency Graph

Dependency Graph
related to related to child of child of duplicate of duplicate of

View Issue Details

This bug affects 1 person(s).
IDProjectCategoryView StatusLast Update
16459Bug reportsPluginspublic2021-01-15 12:30
ReporterDenisChenu Assigned ToDenisChenu  
Status assignedResolutionopen 
Product Version3.22.25 
Summary16459: Add a way to extend Survey list in administration (for Permission)
DescriptionPermission can give rights on Survey , but there are no way to extend Surey listing
Steps To ReproduceTry to create a plugin for admin user with Permission/See on ALL activated survey.

Try to add all activated survey in survey list
Additional InformationUnzure on the good way to do

$coreCriteria = null;
if (!Permission::model()->hasGlobalPermission("surveys", 'read')) {
    $coreCriteria = new CDbCriteria;
        'join'=>"LEFT JOIN {{permissions}} AS permissions ON (permissions.entity_id = t.sid AND permissions.permission='survey' AND permissions.entity='survey' AND permissions.uid='".Yii::app()->user->id."') ",
    $coreCrite````ria->compare('t.owner_id', Yii::app()->user->id, false);
$event = new PluginEvent('searchSurvey');
$event->set('criteria', $coreCriteria);

$oNewCriteria = $event->get('criteria');
if($oNewCriteria) {
    $criteria->mergeWith($oNewCriteria, 'AND');
TagsNo tags attached.
Bug heat2
Complete LimeSurvey version number (& build)3.22.25
I will donate to the project if issue is resolvedNo
Browsernot relevant
Database & DB-Versionnot relevant
Server OS (if known)not relevant
Webserver software & version (if known)not relevant
PHP Versionnot relevant


child of 16440 testingcdorin Feature requests Survey group Permission : minimal system 




2020-07-06 15:34

developer   ~58723 without encoding


2020-11-17 17:30

developer   ~60683

Since have added getPermissionCriteria in Surveys and in SurveyGroups :
I wait for merging this one to add a global event.


2020-11-21 12:45

developer   ~60729

Allow append or set :)

$event = new PluginEvent('searchSurvey');
$event->set('criteria', $coreCriteria);

$finalCriteria = $event->get('criteria');
$aNewCriterias = $event->get('newCriteria');

if(!empty($aNewCriterias)) {
    foreach($aNewCriterias as $newCriteria) {

@gabrieljenik : did you think this event can be intersting ?

Issue History

Date Modified Username Field Change
2020-07-06 15:33 DenisChenu New Issue
2020-07-06 15:34 DenisChenu Note Added: 58723
2020-07-08 11:01 DenisChenu Relationship added related to 16440
2020-11-17 17:30 DenisChenu Note Added: 60683
2020-11-21 12:37 DenisChenu Relationship replaced child of 16440
2020-11-21 12:45 DenisChenu Note Added: 60729
2021-01-15 12:30 DenisChenu Assigned To => DenisChenu
2021-01-15 12:30 DenisChenu Status new => assigned