File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -202,17 +202,17 @@ function plugin_formcreator_addDefaultWhere($itemtype) {
202202 if (Session::haveRight ('config ' , UPDATE )) {
203203 return '' ;
204204 }
205- if (!PluginFormcreatorCommon:: canValidate ()) {
206- return " ` $ table `.`requester_id` = $ currentUser " ;
207- }
205+
206+ // Check the user is a requester
207+ $ condition = " ` $ table `.`requester_id` = $ currentUser " ;
208208
209209 if (Plugin::isPluginActive (PLUGIN_FORMCREATOR_ADVANCED_VALIDATION )) {
210210 return PluginAdvformCommon::addDefaultWhere ($ itemtype );
211211 } else {
212- // check the user
213- $ condition = " (` $ table`.`users_id_validator` = $ currentUser " ;
212+ // Check the user is a validator of the form answer
213+ $ condition . = " OR (`$ table`.`users_id_validator` = $ currentUser " ;
214214
215- // check groups of the user
215+ // check user is a member of validator groups of the form answer
216216 $ groups = Group_User::getUserGroups ($ currentUser );
217217 if (count ($ groups ) < 1 ) {
218218 // The user is not a member of any group
You can’t perform that action at this time.
0 commit comments