[Trunk:Library] fix method Session.isClaimsCurator()
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@54934 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
50c3d7db44
commit
ab9557f39e
|
@ -128,19 +128,18 @@ export class Session{
|
|||
//Methods to check roles
|
||||
public static isClaimsCurator():boolean {
|
||||
var isAuthorized = false;
|
||||
var user:User = this.getUserFromCookie();
|
||||
if(user!=null){
|
||||
return false;
|
||||
}
|
||||
var claimRoles = ["urn:geant:openaire.eu:group:Curator+-+Claim#aai.openaire.eu"]
|
||||
for (var i = 0; i < claimRoles.length; i++) {
|
||||
if ((user.role).indexOf(claimRoles[i]) > -1) {
|
||||
if(Session.isLoggedIn()){
|
||||
var roles = ["urn:geant:openaire.eu:group:Curator+-+Claim#aai.openaire.eu"]
|
||||
for (var i = 0; i < roles.length; i++) {
|
||||
if ((Session.getUser().role).indexOf(roles[i]) > -1) {
|
||||
isAuthorized = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return isAuthorized;
|
||||
}
|
||||
return isAuthorized;
|
||||
}
|
||||
public static isCommunityCurator():boolean {
|
||||
var isAuthorized = false;
|
||||
if(Session.isLoggedIn()){
|
||||
|
|
Loading…
Reference in New Issue