summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--application.rb5
-rw-r--r--helper.rb30
-rw-r--r--model.rb2
3 files changed, 4 insertions, 33 deletions
diff --git a/application.rb b/application.rb
index 8ace27c..d2ee131 100644
--- a/application.rb
+++ b/application.rb
@@ -9,8 +9,9 @@ require 'ftools'
require File.join(File.dirname(__FILE__),'model.rb')
require File.join(File.dirname(__FILE__),'helper.rb')
-use Rack::Session::Cookie, :expire_after => 28800,
- :secret => "ui6vaiNi-change_me"
+#moved to wrapper->environment
+#use Rack::Session::Cookie, :expire_after => 28800,
+# :secret => "ui6vaiNi-change_me"
use Rack::Flash
set :lock, true
diff --git a/helper.rb b/helper.rb
index 698fd3e..80707c3 100644
--- a/helper.rb
+++ b/helper.rb
@@ -1,35 +1,5 @@
helpers do
- def login(username, password)
- logout
- session[:subjectid] = OpenTox::Authorization.authenticate(username, password)
- #LOGGER.debug "ToxCreate login user #{username} with subjectid: " + session[:subjectid].to_s
- if session[:subjectid] != nil
- session[:username] = username
- return true
- else
- session[:username] = ""
- return false
- end
- end
-
- def logout
- if session[:subjectid] != nil
- session[:subjectid] = nil
- session[:username] = ""
- return true
- end
- return false
- end
-
- def logged_in()
- return true if !AA_SERVER
- if session[:subjectid] != nil
- return OpenTox::Authorization.is_token_valid(session[:subjectid])
- end
- return false
- end
-
def is_authorized(uri, action)
if OpenTox::Authorization.server && session[:subjectid] != nil
return OpenTox::Authorization.authorized?(uri, action, session[:subjectid])
diff --git a/model.rb b/model.rb
index e433893..bab5bde 100644
--- a/model.rb
+++ b/model.rb
@@ -31,7 +31,7 @@ class ToxCreateModel < Ohm::Model
attribute :nr_compounds
attribute :nr_predictions
attribute :correct_predictions
- attribute :weighted_area_under_roc
+ attribute :average_area_under_roc
attribute :sensitivity
attribute :specificity
attribute :r_square