Ignore:
Timestamp:
Oct 6, 2011, 1:19:21 PM (11 years ago)
Author:
s.h.sikkema@…
Message:

enabled collecting module measurements for galaxy integration

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/services/dbnp/modules/ModuleCommunicationService.groovy

    r1991 r2049  
    1818import javax.servlet.http.HttpServletResponse
    1919import org.codehaus.groovy.grails.commons.ConfigurationHolder
    20 import org.hibernate.*;
     20import org.hibernate.*
     21import dbnp.authentication.SecUser;
    2122
    2223class ModuleCommunicationService implements Serializable {
     
    105106        * @return                       JSON    JSON object of the parsed text
    106107        */
    107         def callModuleMethod( String consumer, String restUrl, String args = null, String requestMethod = "GET" ) {
    108                 if (!authenticationService.isLoggedIn()) {
     108        def callModuleMethod( String consumer, String restUrl, String args = null, String requestMethod = "GET", SecUser remoteUser = null) {
     109                if (!remoteUser && !authenticationService.isLoggedIn()) {
    109110                        // should not happen because we can only get here when a user is
    110111                        // logged in...
     
    124125
    125126                // put the session token to work
    126                 authenticationService.logInRemotely( consumer, sessionToken, authenticationService.getLoggedInUser() )
    127                
     127                authenticationService.logInRemotely( consumer, sessionToken, remoteUser ?: authenticationService.getLoggedInUser())
     128
    128129                // Append the sessionToken to the parameters
    129130                if( !args ) {
Note: See TracChangeset for help on using the changeset viewer.