function CscopeUser(e,o){console.log("User INIT"),this.user="",this.lastReload=null,this.authToken=e,this.isAdmin=!1,this.environment=o,this.eulaAccepted=!1,"prod"==o&&(console.log=function(){})}CscopeUser.prototype.checkIfIsAdmin=function(t){var r=this;console.log("User CREATE - env: "+r.environment),$.ajax({method:"GET",url:_config[r.environment].api.invokeUrl+"/roles",headers:{Authorization:r.authToken},contentType:"application/json",dataType:"text",success:function(e,o,n){console.log("Success User "+JSON.parse(e).user+" "+e),r.isAdmin=JSON.parse(e).isAdmin,r.user=JSON.parse(e).user,r.lastReload=JSON.parse(e).lastReload,r.eulaAccepted=JSON.parse(e).eulaAccepted;var s=window.location.pathname.replace("/","");console.log("cscopeuser urlRef "+s),r.eulaAccepted||(console.log("EULA not accepted."),"invite.html"==s?(console.log("Invitation in progress"),window.location.href="./signin.html?paramKey=eula&ref="+s):"signin.html"!=s&&(console.log("Sending To EULA."),window.location.href="./signin.html?paramKey=eula&ref="+s,setTimeout(function(){alert("Please Accept Terms of Service before accessing this Website.")},1))),t()},error:function(e,o,n){console.log("Error getting user data: "+o+", Details: "+n+"Response: "+e.responseText),console.error("Error getting user data: ",o,", Details: ",n),console.error("Response user: ",e.responseText),-1==n.toString().indexOf("UserNotFoundException")&&setTimeout(function(){alert("Cscope.info user does not exist.")},1),-1==window.location.href.indexOf("signin.html")&&(window.location.href="./signin.html")}})},CscopeUser.prototype.reloadData=function(e,o){console.log(e+" is reloding data for "+o);$.ajax({method:"GET",url:_config[this.environment].api.invokeUrl+"/reset",headers:{Authorization:this.authToken},data:{callingUser:e,userToReload:o},contentType:"application/json",dataType:"text",success:function(e,o,n){console.log("Success "+JSON.parse(e))},error:function(e,o,n){console.log("Error reloading user data: "+o+", Details: "+n+"Response: "+e.responseText),console.error("Error reloading user data: ",o,", Details: ",n),console.error("Response user: ",e.responseText)}})};