Hello,
I wanted the list to know what I did to CustomerGroup.pm, It
seems some others ran into issues while using LDAP and assigning default
groups. Since I have multiple Customer Companies, I needed something to work. I
modified CustomerGroup.pm adding line 213, 214 and changing $Param{UserID} to
$CusomterIDsql.
The only thing you have to do now is add the email address (@domain.tld)
and permissions to the group id in the table “group_customer_user”.
# if it's activ, return just the permitted groups
my $SQL = "SELECT g.id, g.name,
gu.permission_key, gu.permission_value, gu.user_id "
. " FROM
"
. " groups
g, group_customer_user gu"
. " WHERE
"
. "
g.valid_id IN ( ${\(join ', ', $Self->{ValidObject}->ValidIDsGet())} )
AND "
. " g.id =
gu.group_id AND "
. "
gu.permission_value = 1 AND "
. "
gu.permission_key IN ('" . $Self->{DBObject}->Quote( $Param{Type} )
. "', 'rw') "
. " AND
";
if ( $Param{UserID} ) {
my $CustomerIDsql
= $Param{UserID};
$CustomerIDsql =~
s/^[a-zA-Z0-9._%+-]+//;
$SQL .= " gu.user_id
= '" . $Self->{DBObject}->Quote( $CustomerIDsql ) . "'";
}
else {
$SQL .= "
gu.group_id = " . $Self->{DBObject}->Quote( $Param{GroupID} ) .
"";
}
--
Kyle Anderson