File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 137137 if (isset ($ _POST ['ns2 ' ]) && $ _POST ['ns2 ' ] == '' ) $ error .= $ app ->lng ('error_ns2_empty ' ).'<br /> ' ;
138138 if (isset ($ _POST ['email ' ]) && $ _POST ['email ' ] == '' ) $ error .= $ app ->lng ('error_email_empty ' ).'<br /> ' ;
139139
140+ // make sure that the record belongs to the clinet group and not the admin group when a dmin inserts it
141+ if ($ _SESSION ["s " ]["user " ]["typ " ] == 'admin ' && isset ($ _POST ['client_group_id ' ])) {
142+ $ sys_groupid = intval ($ _POST ['client_group_id ' ]);
143+ } elseif ($ app ->auth ->has_clients ($ _SESSION ['s ' ]['user ' ]['userid ' ]) && isset ($ _POST ['client_group_id ' ])) {
144+ $ sys_groupid = intval ($ _POST ['client_group_id ' ]);
145+ } else {
146+ $ sys_groupid = $ _SESSION ["s " ]["user " ]["default_group " ];
147+ }
148+
140149 $ tform_def_file = "form/dns_soa.tform.php " ;
141150 $ app ->uses ('tform ' );
142151 $ app ->tform ->loadFormDef ($ tform_def_file );
You can’t perform that action at this time.
0 commit comments