/* *******************************************************************
Function: getAuthorizations
Parameters:
Purpose: Calls function to read user SAP Role
******************************************************************* */
function getAuthorizations(){
call('BAPI_USER_GET_DETAIL', {"in.USERNAME":"&V[_user]","table.ACTIVITYGROUPS":"Z_ROLES"});
}
/* *******************************************************************
Function: roleExists
Parameters:
roleName
Purpose: Checks to see if current user has the roleName match
******************************************************************* */
function roleExists(roleName){
for (ii = 0; ii < Z_ROLES.length; ii++) {
var z_userrole = Z_ROLES[ii].toString().substring(0,30).trim();
if(z_userrole == roleName) {
return true;
}
}
return false;
}