File tree 1 file changed +6
-6
lines changed
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) {
202
202
if (Session::haveRight ('config ' , UPDATE )) {
203
203
return '' ;
204
204
}
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 " ;
208
208
209
209
if (Plugin::isPluginActive (PLUGIN_FORMCREATOR_ADVANCED_VALIDATION )) {
210
210
return PluginAdvformCommon::addDefaultWhere ($ itemtype );
211
211
} 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 " ;
214
214
215
- // check groups of the user
215
+ // check user is a member of validator groups of the form answer
216
216
$ groups = Group_User::getUserGroups ($ currentUser );
217
217
if (count ($ groups ) < 1 ) {
218
218
// The user is not a member of any group
You can’t perform that action at this time.
0 commit comments