if ($validtype{$NODE->{type}{title}} and $DB->isApproved($USER,getnode('sitedocclan','usergroup')) ) { .... }