Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Χάρης Παπαδόπουλος
e-epal
Commits
2eddb0e7
Commit
2eddb0e7
authored
Apr 28, 2017
by
Open Source Developer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trans
parent
af1f9efc
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
drupal/modules/epal/src/Controller/CurrentUser.php
drupal/modules/epal/src/Controller/CurrentUser.php
+3
-3
source/services/auth.service.ts
source/services/auth.service.ts
+1
-0
No files found.
drupal/modules/epal/src/Controller/CurrentUser.php
View file @
2eddb0e7
...
...
@@ -51,7 +51,7 @@ 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
,
...
...
source/services/auth.service.ts
View file @
2eddb0e7
...
...
@@ -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
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment