Auth::Custom getDisplayType is broken with choice
Concerned version
Version: 2.0.13
Summary
- Configure a choice with Name = MyChoice, Auth=Null
- Create MyChoice.png logo in static/common/
- Logo is correctly displayed
- Edit MyChoice with Auth=Custom and customAuth=Null
- a form is displayed instead
Logs
getDisplayType in Auth::Custom tries to detect the logo, I'm not sure why. It should delegate this to the underlying module (or Choice) instead.
getDisplayType {
# Warning : $self passed here is the Portal itself
my ($self) = @_;
my $logo = ( $self->{conf}->{customAuth} =~ /::(\w+)$/ )[0];
if ( -e $self->{conf}->{templateDir}
. "/../htdocs/static/common/modules/"
. $logo
. ".png" )
{
$self->logger->debug("CustomAuth $logo.png found");
return "logo";
}
return "standardform";
}
Backends used
For any bug on configuration/sessions storage, give us details on backends
Possible fixes
- Remove getDisplayType in Auth::Custom (why is it needed??)
- Rework Lib/Choice.pm:
my $displayType = eval {
"Lemonldap::NG::Portal::Auth::${auth}"
->can('getDisplayType')->( $self, $req );
} || 'logo';
to call the loaded module instance's getDisplayType instead