You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ngcp-panel/lib/NGCP/Panel/AuthenticationStore/RoleFromRealm.pm

13 lines
309 B

package NGCP::Panel::AuthenticationStore::RoleFromRealm;
use Sipwise::Base;
extends 'Catalyst::Authentication::Store::DBIx::Class::User';
sub roles {
my ($self) = @_;
if($self->auth_realm eq "subscriber" && $self->_user->admin) {
return "subscriberadmin";
}
return $self->auth_realm;
}