Commit 2eddb0e7 authored by Open Source Developer's avatar Open Source Developer

trans

parent af1f9efc
......@@ -34,7 +34,7 @@ class CurrentUser extends ControllerBase
$container->get('entity_type.manager'),
$container->get('database'),
$container->get('logger.factory')
);
);
}
public function getLoginInfo(Request $request)
......@@ -51,14 +51,14 @@ class CurrentUser extends ControllerBase
$userRoles = $user->getRoles();
foreach ($userRoles as $userRole) {
if ($userRole === 'epal') {
if (($userRole === 'epal') || ($userRole === 'regioneduadmin') || ($userRole === 'eduadmin')) {
return $this->respondWithStatus([
'name' => $user->mail->value,
'title' => $user->init->value,
], Response::HTTP_OK);
} else if ($userRole === 'applicant') {
break;
}
}
}
......
......@@ -22,6 +22,7 @@ export class AuthService {
}).subscribe(loginInfo => {
if (loginInfo.size > 0) {
loginInfo.reduce(({}, loginInfoToken) => {
console.log(loginInfoToken.auth_role,"aaaaaaa");
if (loginInfoToken.auth_token && loginInfoToken.auth_token.length > 0 && loginInfoToken.auth_role === role) {
resolve(true);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment