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

trans

parent af1f9efc
...@@ -51,7 +51,7 @@ class CurrentUser extends ControllerBase ...@@ -51,7 +51,7 @@ class CurrentUser extends ControllerBase
$userRoles = $user->getRoles(); $userRoles = $user->getRoles();
foreach ($userRoles as $userRole) { foreach ($userRoles as $userRole) {
if ($userRole === 'epal') { if (($userRole === 'epal') || ($userRole === 'regioneduadmin') || ($userRole === 'eduadmin')) {
return $this->respondWithStatus([ return $this->respondWithStatus([
'name' => $user->mail->value, 'name' => $user->mail->value,
'title' => $user->init->value, 'title' => $user->init->value,
......
...@@ -22,6 +22,7 @@ export class AuthService { ...@@ -22,6 +22,7 @@ export class AuthService {
}).subscribe(loginInfo => { }).subscribe(loginInfo => {
if (loginInfo.size > 0) { if (loginInfo.size > 0) {
loginInfo.reduce(({}, loginInfoToken) => { loginInfo.reduce(({}, loginInfoToken) => {
console.log(loginInfoToken.auth_role,"aaaaaaa");
if (loginInfoToken.auth_token && loginInfoToken.auth_token.length > 0 && loginInfoToken.auth_role === role) { if (loginInfoToken.auth_token && loginInfoToken.auth_token.length > 0 && loginInfoToken.auth_role === role) {
resolve(true); 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