summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormconway <michael.c.conway@gmail.com>2013-02-19 18:59:40 (GMT)
committer mconway <michael.c.conway@gmail.com>2013-02-19 18:59:40 (GMT)
commit4a6a94bf6c3962297a99f9f4c0b415b2304b4e96 (patch)
tree74683c85496986827d9cbaacfefebcb5bc2b9f4b
parentb8ed95f124d18e29ae7ab6143d3a788d69a7cb67 (diff)
downloadQCG-Data-4a6a94bf6c3962297a99f9f4c0b415b2304b4e96.zip
QCG-Data-4a6a94bf6c3962297a99f9f4c0b415b2304b4e96.tar.gz
QCG-Data-4a6a94bf6c3962297a99f9f4c0b415b2304b4e96.tar.bz2
[#1217] detect for strict acl and show home dir broken
-rwxr-xr-xidrop-web/grails-app/conf/Config.groovy4
-rwxr-xr-xidrop-web/grails-app/controllers/org/irods/mydrop/controller/BrowseController.groovy32
-rwxr-xr-xidrop-web/grails-app/controllers/org/irods/mydrop/controller/LoginController.groovy1
-rwxr-xr-xidrop-web/grails-app/views/common/_topbar.gsp2
-rwxr-xr-xidrop-web/web-app/js/mydrop/home.js2
-rwxr-xr-xidrop-web/web-app/js/mydrop/main.js7
6 files changed, 23 insertions, 25 deletions
diff --git a/idrop-web/grails-app/conf/Config.groovy b/idrop-web/grails-app/conf/Config.groovy
index 1453a97..71545df 100755
--- a/idrop-web/grails-app/conf/Config.groovy
+++ b/idrop-web/grails-app/conf/Config.groovy
@@ -183,11 +183,11 @@ log4j = {
'net.sf.ehcache.hibernate'
//info 'org.irods.mydrop'
- debug 'org.irods.jargon'
+ info 'org.irods.jargon'
warn 'org.irods.jargon.spring.security'
warn 'org.springframework'
- warn 'grails.app'
+ debug 'grails.app'
warn 'org.mortbay.log',
'grails.app.controller',
diff --git a/idrop-web/grails-app/controllers/org/irods/mydrop/controller/BrowseController.groovy b/idrop-web/grails-app/controllers/org/irods/mydrop/controller/BrowseController.groovy
index 3efb564..8ddd928 100755
--- a/idrop-web/grails-app/controllers/org/irods/mydrop/controller/BrowseController.groovy
+++ b/idrop-web/grails-app/controllers/org/irods/mydrop/controller/BrowseController.groovy
@@ -65,25 +65,27 @@ class BrowseController {
ViewState viewState = viewStateService.getViewStateFromSessionAndCreateIfNotThere()
log.info("viewState:${viewState}")
-
- if (viewState) {
- mode = "path"
+ if (mode == null && absPath == null) {
+ log.info("coming in with no params for mode or path, check view state and use the mode and path there (if they exist)")
absPath = viewState.rootPath
+ if (absPath) {
+ log.info("i have a previous abspath in the view state, so use that path and set mode to 'path' too: ${absPath}")
+ mode = "path"
+ }
}
-
- if (mode != null) {
- if (mode == "path") {
- log.info("mode is path, should have an abspath to preset to")
- if (absPath == null) {
- def message = message(code:"error.no.path.provided")
- response.sendError(500,message)
- return
- } else {
- log.info("path is ${absPath}")
- }
+
+ if (mode == "path") {
+ log.info("mode is path, should have an abspath to preset to")
+ if (absPath == null) {
+ def message = message(code:"error.no.path.provided")
+ response.sendError(500,message)
+ return
+ } else {
+ log.info("path is ${absPath}")
}
}
+
render(view: "index", model:[mode:mode,path:absPath,viewState:viewState])
}
@@ -191,6 +193,8 @@ class BrowseController {
* If I have a preserved view state, initialize to that
*/
+ log.info("path type is detect")
+
ViewState viewState = viewStateService.getViewStateFromSessionAndCreateIfNotThere()
if (viewState.rootPath) {
diff --git a/idrop-web/grails-app/controllers/org/irods/mydrop/controller/LoginController.groovy b/idrop-web/grails-app/controllers/org/irods/mydrop/controller/LoginController.groovy
index 9926abd..c8e449a 100755
--- a/idrop-web/grails-app/controllers/org/irods/mydrop/controller/LoginController.groovy
+++ b/idrop-web/grails-app/controllers/org/irods/mydrop/controller/LoginController.groovy
@@ -192,6 +192,7 @@ class LoginController {
}
def logout = {
+ session["SPRING_SECURITY_CONTEXT"] = null
session.invalidate()
redirect(action:"login")
}
diff --git a/idrop-web/grails-app/views/common/_topbar.gsp b/idrop-web/grails-app/views/common/_topbar.gsp
index 5ef2027..fee43d3 100755
--- a/idrop-web/grails-app/views/common/_topbar.gsp
+++ b/idrop-web/grails-app/views/common/_topbar.gsp
@@ -39,7 +39,7 @@
<g:message code="text.account" /> <g:ifAuthenticated> <g:ifNotGuestAccount>( <span id="accountZoneAndUserDisplay"><g:accountInfo /></span> )<b class="caret"></b> </g:ifNotGuestAccount></g:ifAuthenticated></a>
<ul class="dropdown-menu">
<g:ifAuthenticated>
- <li><a href="#" id="logoutButton" onclick="logout()")><g:message code="text.logout" /></a></li>
+ <li><g:link controller="login" action="logout"><g:message code="text.logout" /></g:link></li>
<g:ifNotGuestAccount>
<li><a href="#" id="changePasswordButton"><g:link controller="login" action="changePasswordForm"><g:message code="text.change.password" /></g:link></a></li>
</g:ifNotGuestAccount>
diff --git a/idrop-web/web-app/js/mydrop/home.js b/idrop-web/web-app/js/mydrop/home.js
index 2cb5d32..4d1b74a 100755
--- a/idrop-web/web-app/js/mydrop/home.js
+++ b/idrop-web/web-app/js/mydrop/home.js
@@ -76,7 +76,7 @@ function retrieveBrowserFirstView(type, path, pathSelectedInTree) {
} else if (type == 'detect') {
path = "";
} else {
- throw "invalid type parameter";
+ throw "invalid type parameter:" + type;
}
} else {
type = "path";
diff --git a/idrop-web/web-app/js/mydrop/main.js b/idrop-web/web-app/js/mydrop/main.js
index 519f291..42c0135 100755
--- a/idrop-web/web-app/js/mydrop/main.js
+++ b/idrop-web/web-app/js/mydrop/main.js
@@ -31,8 +31,6 @@ var displayIndex = 0;
*/
var splitMode = 'n';
-
-
/**
* Linked to update tags button on info view, update the tags in iRODS
*/
@@ -76,11 +74,6 @@ function updateTagsAtPath(path, tags, comment) {
unblockPanel();
}
-
-function logout() {
- window.location = context + "/login/logout";
-}
-
/**
* Code to format a 'crumb trail' header
*