Skip to content
Snippets Groups Projects
Verified Commit dc1984eb authored by Andrej Ramašeuski's avatar Andrej Ramašeuski
Browse files

Dalsi oprava Auth

parent 4284437c
No related branches found
No related tags found
No related merge requests found
Pipeline #19975 passed
...@@ -2,7 +2,7 @@ image: docker:latest ...@@ -2,7 +2,7 @@ image: docker:latest
variables: variables:
DOCKER_TLS_CERTDIR: "/certs" DOCKER_TLS_CERTDIR: "/certs"
IMAGE_VER: 0.21.4 IMAGE_VER: 0.21.5
services: services:
- docker:dind - docker:dind
......
...@@ -76,6 +76,7 @@ sub register ( $class, $self, $conf) { ...@@ -76,6 +76,7 @@ sub register ( $class, $self, $conf) {
$self->helper( oauth_main_group => sub ( $c ) { $self->helper( oauth_main_group => sub ( $c ) {
my $claims = $c->oauth_claims // return; my $claims = $c->oauth_claims // return;
my $cen_regp;
GROUP: GROUP:
foreach my $group ( sort @{ $claims->{groups} } ) { foreach my $group ( sort @{ $claims->{groups} } ) {
...@@ -90,13 +91,18 @@ sub register ( $class, $self, $conf) { ...@@ -90,13 +91,18 @@ sub register ( $class, $self, $conf) {
role => $role, role => $role,
}; };
} }
elsif ( $group =~ /cen:regp/ ) { if ( $group =~ /cen:regp/ ) {
return { $cen_regp = 1;
region => '',
role => 'regp',
};
} }
} }
if ( $cen_regp ) {
return {
region => 'Praha',
role => 'regp',
};
}
}); });
$self->helper( user => sub ( $c ) { $self->helper( user => sub ( $c ) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment