Changeset 4990
- Timestamp:
- 04/16/14 12:11:14 (10 years ago)
- Location:
- cats/ISOcat/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
cats/ISOcat/trunk/mod-ISOcat-control-access/control/credentials.js
r4036 r4990 16 16 cred = null; 17 17 shib = null; 18 shdr = null; 18 19 19 20 // first try HTTP Basic authentication … … 45 46 shres = context.issueSubRequest(shreq); 46 47 if (shres != null) { 47 java.lang.System.out.println("DBG:credentials.js:shib headers["+shres.getAspects()+"]");48 //java.lang.System.out.println("DBG:credentials.js:shib headers["+shres.getAspects()+"]"); 48 49 if (shres.hasAspect(DOMXDAAspect)) { 49 50 shres = shres.getAspect(DOMXDAAspect); 50 java.lang.System.out.println("DBG:credentials.js:XDA["+shres+"]");51 //java.lang.System.out.println("DBG:credentials.js:XDA["+shres+"]"); 51 52 if (shres != null) { 52 53 shres = shres.getXDA(); 53 54 if (shres.isTrue("/nvp/header")) { 54 55 shres = shres.getText("/nvp/header",true); 55 java.lang.System.out.println("DBG:credentials.js:shib headers["+shres+"]");56 //java.lang.System.out.println("DBG:credentials.js:shib headers["+shres+"]"); 56 57 if (shres != "") { 57 58 shibHeaders = shres; … … 61 62 } 62 63 } 63 java.lang.System.out.println("DBG:credentials.js:shib headers["+shibHeaders+"]");64 //java.lang.System.out.println("DBG:credentials.js:shib headers["+shibHeaders+"]"); 64 65 shibHeaders = shibHeaders.split(" "); 65 66 for (i in shibHeaders) { … … 67 68 var auth = req.getArgument(shibHeaders[i]); 68 69 auth = auth.replace("data:text/plain,",""); 69 java.lang.System.out.println("DBG:credentials.js:principal["+shibHeaders[i]+"]["+auth+"]");70 //java.lang.System.out.println("DBG:credentials.js:principal["+shibHeaders[i]+"]["+auth+"]"); 70 71 if (auth != "") { 71 72 shib = auth; 73 shdr = shibHeaders[i]; 72 74 break; 73 75 } … … 148 150 } 149 151 152 java.lang.System.out.println("DBG:credentials.js:shiboleth principal["+shdr+"]["+shib+"]"); 150 153 //java.lang.System.out.println("DBG:credentials.js:authorization credentials["+cred+"]"); 151 //java.lang.System.out.println("DBG:credentials.js:shiboleth principal["+shib+"]");152 154 153 155 for(iter = req.getArguments(); iter.hasNext(); ) { … … 155 157 if (arg.equals("Authorization")) { 156 158 continue; 157 } else if (arg.equals("eduPersonPrincipalName")) { 158 continue; 159 } else if (arg.equals("eduPersonTargetedID")) { 159 } else if (shdr!=null && arg.equals(shdr)) { 160 160 continue; 161 161 } else if (arg.equals("principal")) { -
cats/ISOcat/trunk/mod-ISOcat-interface-gi/interface/JSXAPPS/ISOcat/js/org/isocat/gui/DCViewer.js
r4948 r4990 327 327 }; 328 328 329 DCViewer_prototype.loaded = function (objEvent) { 330 var req = objEvent.target; 331 var doc = req.getResponseXML(); 332 333 if ((req.getStatus() != 200) || (doc == null)) { 334 org.isocat.gui.DCViewer.log.info("DC request failed[" + req.getStatus() + "][" + doc + "][" + req.getResponseText() + "]"); 335 org.isocat.APP.alert("DC loading failed", "The DC couldn't be loaded! You might not have the right to access it (anymore).", null, "OK"); 336 337 // hide the loading overlay 338 org.isocat.gui.Loading.load(this.view).hide(); 339 org.isocat.gui.DCViewer.log.info("hiding loading overlay?"); 340 341 this.reset(); 342 return; 343 } 344 345 org.isocat.gui.DCViewer.log.info("DC request succeeded[" + req.getStatus() + "]"); 346 347 var div = doc.selectSingleNode("//div[@class='main']"); 348 this.anchors(div, true); 349 350 this.viewer.setText(div.toString(), true); 351 this.viewer.getRendered().scrollTop = 0; 352 this.viewer.getRendered().scrollLeft = 0; 353 329 DCViewer_prototype.resetView = function () { 354 330 // close some sections 355 331 $('.dc-' + this.dc.id + '-adminrec').toggle(); 356 332 $('.dc-' + this.dc.id + '-langsec').toggle(); 357 333 $('.dc-' + this.dc.id + '-langsec-en').addClass('dc-' + this.dc.id + '-langsec'); 334 }; 335 336 DCViewer_prototype.loaded = function (objEvent) { 337 var req = objEvent.target; 338 var doc = req.getResponseXML(); 339 340 if ((req.getStatus() != 200) || (doc == null)) { 341 org.isocat.gui.DCViewer.log.info("DC request failed[" + req.getStatus() + "][" + doc + "][" + req.getResponseText() + "]"); 342 org.isocat.APP.alert("DC loading failed", "The DC couldn't be loaded! You might not have the right to access it (anymore).", null, "OK"); 343 344 // hide the loading overlay 345 org.isocat.gui.Loading.load(this.view).hide(); 346 org.isocat.gui.DCViewer.log.info("hiding loading overlay?"); 347 348 this.reset(); 349 return; 350 } 351 352 org.isocat.gui.DCViewer.log.info("DC request succeeded[" + req.getStatus() + "]"); 353 354 var div = doc.selectSingleNode("//div[@class='main']"); 355 this.anchors(div, true); 356 357 this.viewer.setText(div.toString(), true); 358 this.viewer.getRendered().scrollTop = 0; 359 this.viewer.getRendered().scrollLeft = 0; 360 361 this.resetView(); 358 362 359 363 // hide the loading overlay -
cats/ISOcat/trunk/mod-ISOcat-interface-gi/interface/JSXAPPS/ISOcat/js/org/isocat/gui/Explorer.js
r4970 r4990 382 382 view.controller.setWindow(window);// close some sections 383 383 384 $('.dc-'+dc.id+'-adminrec').toggle(); 385 $('.dc-'+dc.id+'-langsec').toggle(); 386 $('.dc-'+dc.id+'-langsec-en').addClass('dc-'+dc.id+'-langsec'); 384 view.controller.resetView(); 387 385 388 386 this.loadDataCategoryView();
Note: See TracChangeset
for help on using the changeset viewer.