Remove some stumbling blocks in default/example configs
authorTom Clegg <tom@curoverse.com>
Wed, 12 Mar 2014 22:10:32 +0000 (18:10 -0400)
committerTom Clegg <tom@curoverse.com>
Thu, 13 Mar 2014 03:33:58 +0000 (23:33 -0400)
services/api/app/models/user.rb
services/api/config/application.default.yml
services/api/config/application.yml.example

index a85a63df7d8d579ff94f1a8d830e4ebd1289a8dc..0896571939e8cfd7ab9296645f8087036001fea7 100644 (file)
@@ -124,7 +124,7 @@ class User < ArvadosModel
   end
 
   def check_auto_admin
-    if User.where("uuid not like '%-000000000000000'").where(:is_admin => true).count == 0 and not Rails.configuration.auto_admin_user.nil?
+    if User.where("uuid not like '%-000000000000000'").where(:is_admin => true).count == 0 and Rails.configuration.auto_admin_user
       if current_user.email == Rails.configuration.auto_admin_user
         self.is_admin = true
         self.is_active = true
index 36eedb4fceec8fb264613f39289043b5d1696170..11dcc54b043ed9a1b044c2b229f9c1f02a00673f 100644 (file)
@@ -39,6 +39,7 @@ test:
   action_mailer.delivery_method: :test
   active_support.deprecation: :stderr
   active_record.mass_assignment_sanitizer: :strict
+  uuid_prefix: zzzzz
 
 common:
   secret_token: ~
@@ -83,4 +84,4 @@ common:
   # In the default configuration, authentication happens through the Arvados SSO
   # server, which uses openid against Google's servers, so in that case this
   # should be an address associated with a Google account.
-  auto_admin_user: ~
+  auto_admin_user: false
index c48308d0935af8a7c9cb2e1ee8de4c0d0b7291d5..60193ced8786c38f139afbc4dfd57ff5662a6ec9 100644 (file)
@@ -25,17 +25,9 @@ production:
       Net::HTTP.get(URI("http://169.254.169.254/latest/meta-data/#{iface}-ipv4")).match(/^[\d\.]+$/)[0]
     end << '172.16.0.23'
   %>
-  # You must customize these. See application.default.yml for information.
-  compute_node_ami: ~
-  compute_node_ec2_tag_enable: ~
-  compute_node_domain: ~
-  compute_node_spot_bid: ~
 
 test:
   uuid_prefix: zzzzz
+  secret_token: <%= rand(2**512).to_s(36) %>
 
 common:
-  secret_token: ~
-  compute_node_nameservers:
-    - 192.168.0.1
-    - 172.16.0.1