summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2014-06-30 12:01:41 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2014-06-30 12:01:41 -0400
commit9ba53806df1f82bc3b110a151585e1c26c4dfb64 (patch)
treeb76c8005f81e7232a58f96b2548b9231e1c5ca54
parenta0863f309f8abc2e37af5adbfbeee6e85eccb60c (diff)
Apparently integers in postgress are signed 32-bit integers. I overflowed them.
-rw-r--r--app/controllers/users_controller.rb2
-rw-r--r--db/seeds.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index e9efb36..f4cb15c 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -41,7 +41,7 @@ class UsersController < ApplicationController
sign_in @user
if @user.id == 1
# This is the first user, so give them all the power
- @user.permissions = 0xFFFFFFFF
+ @user.permissions = 0x7FFFFFFF
@user.save
end
format.html { redirect_to root_path, notice: 'User was successfully created.' }
diff --git a/db/seeds.rb b/db/seeds.rb
index 869aa86..37e4b3a 100644
--- a/db/seeds.rb
+++ b/db/seeds.rb
@@ -26,7 +26,7 @@ rockpaperscissors.settings.create!(display_order: 6, name: "check_boxes"
if Rails.env.development? or (ENV['FORCE_SEED'] and not ENV['FORCE_SEED'].empty?)
# User 1, the ADMIN
- admin = User.create!(name: "Administrator", user_name: "admin", email: "root@localhost.lan", password: "password", permissions: 0xFFFFFFFF)
+ admin = User.create!(name: "Administrator", user_name: "admin", email: "root@localhost.lan", password: "password", permissions: 0xFFFFFFF)
# John Doe's for testing
User.create!(name: "John 0", password: "password", email: "john0@gmail.com", user_name: "johndoe0")