View Issue Details

This bug affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
16662Bug reportsPluginspublic2020-12-30 19:27
ReporterJmantysalo Assigned Toollehar  
PrioritynoneSeverityminor 
Status closedResolutionfixed 
Product Version4.3.14 
Summary16662: Event beforePermissionSetSave is not dispatched
Description

In https://github.com/LimeSurvey/LimeSurvey/blob/master/application/models/Permission.php#L262 there is a new PluginEvent of type beforePermissionSetSave created, but it has no corresponding dispatchEvent. Hence the plugin AuditLog can not fully work.

TagsNo tags attached.
Bug heat8
Complete LimeSurvey version number (& build)Version 4.3.14+200826
I will donate to the project if issue is resolvedNo
Browser
Database type & versionN/A
Server OS (if known)
Webserver software & version (if known)
PHP VersionN/A

Users monitoring this issue

There are no users monitoring this issue.

Activities

Jmantysalo

Jmantysalo

2020-09-15 11:48

reporter   ~59809

It suffices to add

App()->getPluginManager()->dispatchEvent($oEvent);

after line 265 at the file. Currently wondering how to make a pull request in GitHub...

ollehar

ollehar

2020-09-15 15:07

administrator   ~59815

Good catch. Github has lots of documentation on how to do a pull request. Join us on telegram if you need guidance.

Jmantysalo

Jmantysalo

2020-09-16 07:45

reporter   ~59839

If I got it right this time, then the fix is at https://github.com/LimeSurvey/LimeSurvey/pull/1593 and I guess you will get a notification of a pull request after some automatic checks are done.

Telegram? More info on that is available at [please make a www-page if not already exists]?

DenisChenu

DenisChenu

2020-10-31 11:23

developer   ~60479

Since it's merged, i think it's OK ?
Can you confirm ?

PS : i update the event in https://github.com/LimeSurvey/LimeSurvey/pull/1593/files

        $oEvent = new \LimeSurvey\PluginManager\PluginEvent('beforePermissionSetSave');
        $oEvent->set('aNewPermissions', $aFilteredPermissions);
        $oEvent->set('iSurveyID', $iEntityID);
        $oEvent->set('entity', $sEntityName); /* New in 4.X.X */
        $oEvent->set('entityId', $iEntityID); /* New in 4.X.X */
        $oEvent->set('iUserID', $iUserID);
        App()->getPluginManager()->dispatchEvent($oEvent);

entity and entity added …

Jmantysalo

Jmantysalo

2020-10-31 15:04

reporter   ~60480

Since it's merged, i think it's OK ?

Yes, it's OK.

DenisChenu

DenisChenu

2020-10-31 16:13

developer   ~60481

Thank you !

cdorin

cdorin

2020-12-30 19:27

reporter   ~61336

fixed in 4.4.0 rc1

Issue History

Date Modified Username Field Change
2020-09-11 12:17 Jmantysalo New Issue
2020-09-15 11:48 Jmantysalo Note Added: 59809
2020-09-15 15:07 ollehar Note Added: 59815
2020-09-16 07:45 Jmantysalo Note Added: 59839
2020-10-31 11:23 DenisChenu Assigned To => DenisChenu
2020-10-31 11:23 DenisChenu Status new => feedback
2020-10-31 11:23 DenisChenu Note Added: 60479
2020-10-31 15:04 Jmantysalo Note Added: 60480
2020-10-31 15:04 Jmantysalo Status feedback => assigned
2020-10-31 16:13 DenisChenu Assigned To DenisChenu => ollehar
2020-10-31 16:13 DenisChenu Status assigned => resolved
2020-10-31 16:13 DenisChenu Resolution open => fixed
2020-10-31 16:13 DenisChenu Note Added: 60481
2020-12-30 19:27 cdorin Note Added: 61336
2020-12-30 19:27 cdorin Status resolved => closed