[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,18 +128,17 @@ export class Session{
|
||||||
//Methods to check roles
|
//Methods to check roles
|
||||||
public static isClaimsCurator():boolean {
|
public static isClaimsCurator():boolean {
|
||||||
var isAuthorized = false;
|
var isAuthorized = false;
|
||||||
var user:User = this.getUserFromCookie();
|
if(Session.isLoggedIn()){
|
||||||
if(user!=null){
|
var roles = ["urn:geant:openaire.eu:group:Curator+-+Claim#aai.openaire.eu"]
|
||||||
return false;
|
for (var i = 0; i < roles.length; i++) {
|
||||||
}
|
if ((Session.getUser().role).indexOf(roles[i]) > -1) {
|
||||||
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) {
|
|
||||||
isAuthorized = true;
|
isAuthorized = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return isAuthorized;
|
return isAuthorized;
|
||||||
|
}
|
||||||
|
return isAuthorized;
|
||||||
}
|
}
|
||||||
public static isCommunityCurator():boolean {
|
public static isCommunityCurator():boolean {
|
||||||
var isAuthorized = false;
|
var isAuthorized = false;
|
||||||
|
|
Loading…
Reference in New Issue