diff --git a/.DS_Store b/.DS_Store old mode 100644 new mode 100755 diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 diff --git a/.rvmrc b/.rvmrc old mode 100644 new mode 100755 diff --git a/Gemfile b/Gemfile old mode 100644 new mode 100755 diff --git a/Gemfile.lock b/Gemfile.lock old mode 100644 new mode 100755 diff --git a/Guardfile b/Guardfile old mode 100644 new mode 100755 diff --git a/Procfile b/Procfile old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/README.rdoc b/README.rdoc old mode 100644 new mode 100755 diff --git a/Rakefile b/Rakefile old mode 100644 new mode 100755 diff --git a/app/.DS_Store b/app/.DS_Store old mode 100644 new mode 100755 diff --git a/app/assets/.DS_Store b/app/assets/.DS_Store old mode 100644 new mode 100755 diff --git a/app/assets/images/.DS_Store b/app/assets/images/.DS_Store old mode 100644 new mode 100755 diff --git a/app/assets/images/1.jpg b/app/assets/images/1.jpg old mode 100644 new mode 100755 diff --git a/app/assets/images/2.jpg b/app/assets/images/2.jpg old mode 100644 new mode 100755 diff --git a/app/assets/images/3.jpg b/app/assets/images/3.jpg old mode 100644 new mode 100755 diff --git a/app/assets/images/4.jpg b/app/assets/images/4.jpg old mode 100644 new mode 100755 diff --git a/app/assets/images/alpha.png b/app/assets/images/alpha.png old mode 100644 new mode 100755 diff --git a/app/assets/images/blackforest.png b/app/assets/images/blackforest.png old mode 100644 new mode 100755 diff --git a/app/assets/images/clear.png b/app/assets/images/clear.png old mode 100644 new mode 100755 diff --git a/app/assets/images/company.png b/app/assets/images/company.png old mode 100644 new mode 100755 diff --git a/app/assets/images/email.png b/app/assets/images/email.png old mode 100644 new mode 100755 diff --git a/app/assets/images/fonts/.DS_Store b/app/assets/images/fonts/.DS_Store old mode 100644 new mode 100755 diff --git a/app/assets/images/fonts/icomoon.dev.svg b/app/assets/images/fonts/icomoon.dev.svg old mode 100644 new mode 100755 diff --git a/app/assets/images/fonts/icomoon.eot b/app/assets/images/fonts/icomoon.eot old mode 100644 new mode 100755 diff --git a/app/assets/images/fonts/icomoon.svg b/app/assets/images/fonts/icomoon.svg old mode 100644 new mode 100755 diff --git a/app/assets/images/fonts/icomoon.ttf b/app/assets/images/fonts/icomoon.ttf old mode 100644 new mode 100755 diff --git a/app/assets/images/fonts/icomoon.woff b/app/assets/images/fonts/icomoon.woff old mode 100644 new mode 100755 diff --git a/app/assets/images/fonts/lte-ie7.js b/app/assets/images/fonts/lte-ie7.js old mode 100644 new mode 100755 diff --git a/app/assets/images/glyphicons-halflings-white.png b/app/assets/images/glyphicons-halflings-white.png old mode 100644 new mode 100755 diff --git a/app/assets/images/glyphicons-halflings.png b/app/assets/images/glyphicons-halflings.png old mode 100644 new mode 100755 diff --git a/app/assets/images/html-screen.jpg b/app/assets/images/html-screen.jpg old mode 100644 new mode 100755 diff --git a/app/assets/images/hue.png b/app/assets/images/hue.png old mode 100644 new mode 100755 diff --git a/app/assets/images/key.png b/app/assets/images/key.png old mode 100644 new mode 100755 diff --git a/app/assets/images/loading-black.gif b/app/assets/images/loading-black.gif old mode 100644 new mode 100755 diff --git a/app/assets/images/loading-blue.gif b/app/assets/images/loading-blue.gif old mode 100644 new mode 100755 diff --git a/app/assets/images/loading-green.gif b/app/assets/images/loading-green.gif old mode 100644 new mode 100755 diff --git a/app/assets/images/loading-orange.gif b/app/assets/images/loading-orange.gif old mode 100644 new mode 100755 diff --git a/app/assets/images/loading-red.gif b/app/assets/images/loading-red.gif old mode 100644 new mode 100755 diff --git a/app/assets/images/loading.gif b/app/assets/images/loading.gif old mode 100644 new mode 100755 diff --git a/app/assets/images/logo-blue.png b/app/assets/images/logo-blue.png old mode 100644 new mode 100755 diff --git a/app/assets/images/logo.png b/app/assets/images/logo.png old mode 100644 new mode 100755 diff --git a/app/assets/images/logo.psd b/app/assets/images/logo.psd old mode 100644 new mode 100755 diff --git a/app/assets/images/logo1.png b/app/assets/images/logo1.png old mode 100644 new mode 100755 diff --git a/app/assets/images/logo2.png b/app/assets/images/logo2.png old mode 100644 new mode 100755 diff --git a/app/assets/images/logo3.png b/app/assets/images/logo3.png old mode 100644 new mode 100755 diff --git a/app/assets/images/profile.jpg b/app/assets/images/profile.jpg old mode 100644 new mode 100755 diff --git a/app/assets/images/profile.png b/app/assets/images/profile.png old mode 100644 new mode 100755 diff --git a/app/assets/images/profile1.png b/app/assets/images/profile1.png old mode 100644 new mode 100755 diff --git a/app/assets/images/profile_color.jpg b/app/assets/images/profile_color.jpg old mode 100644 new mode 100755 diff --git a/app/assets/images/saturation.png b/app/assets/images/saturation.png old mode 100644 new mode 100755 diff --git a/app/assets/images/select2.png b/app/assets/images/select2.png old mode 100644 new mode 100755 diff --git a/app/assets/images/social_icons.png b/app/assets/images/social_icons.png old mode 100644 new mode 100755 diff --git a/app/assets/images/sorting.png b/app/assets/images/sorting.png old mode 100644 new mode 100755 diff --git a/app/assets/images/sorting_asc.png b/app/assets/images/sorting_asc.png old mode 100644 new mode 100755 diff --git a/app/assets/images/sorting_desc.png b/app/assets/images/sorting_desc.png old mode 100644 new mode 100755 diff --git a/app/assets/images/ui-icons_3d80b3_256x240.png b/app/assets/images/ui-icons_3d80b3_256x240.png old mode 100644 new mode 100755 diff --git a/app/assets/javascripts/.DS_Store b/app/assets/javascripts/.DS_Store old mode 100644 new mode 100755 diff --git a/app/assets/javascripts/alertify.min.js b/app/assets/javascripts/alertify.min.js old mode 100644 new mode 100755 diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js old mode 100644 new mode 100755 diff --git a/app/assets/javascripts/bootstrap-colorpicker.js b/app/assets/javascripts/bootstrap-colorpicker.js old mode 100644 new mode 100755 diff --git a/app/assets/javascripts/bootstrap-editable.min.js b/app/assets/javascripts/bootstrap-editable.min.js old mode 100644 new mode 100755 diff --git a/app/assets/javascripts/bootstrap-image-gallery-main.js b/app/assets/javascripts/bootstrap-image-gallery-main.js old mode 100644 new mode 100755 diff --git a/app/assets/javascripts/bootstrap-image-gallery.js b/app/assets/javascripts/bootstrap-image-gallery.js old mode 100644 new mode 100755 diff --git a/app/assets/javascripts/bootstrap-timepicker.js b/app/assets/javascripts/bootstrap-timepicker.js old mode 100644 new mode 100755 diff --git a/app/assets/javascripts/bootstrap.js b/app/assets/javascripts/bootstrap.js old mode 100644 new mode 100755 diff --git a/app/assets/javascripts/date-picker/date.js b/app/assets/javascripts/date-picker/date.js old mode 100644 new mode 100755 diff --git a/app/assets/javascripts/date-picker/daterangepicker.js b/app/assets/javascripts/date-picker/daterangepicker.js old mode 100644 new mode 100755 diff --git a/app/assets/javascripts/fullcalendar.js b/app/assets/javascripts/fullcalendar.js old mode 100644 new mode 100755 diff --git a/app/assets/javascripts/jquery-ui-1.8.23.custom.min.js b/app/assets/javascripts/jquery-ui-1.8.23.custom.min.js old mode 100644 new mode 100755 diff --git a/app/assets/javascripts/jquery.bootstrap.wizard.js b/app/assets/javascripts/jquery.bootstrap.wizard.js old mode 100644 new mode 100755 diff --git a/app/assets/javascripts/jquery.dataTables.js b/app/assets/javascripts/jquery.dataTables.js old mode 100644 new mode 100755 diff --git a/app/assets/javascripts/jquery.easy-pie-chart.js b/app/assets/javascripts/jquery.easy-pie-chart.js old mode 100644 new mode 100755 diff --git a/app/assets/javascripts/jquery.min.js b/app/assets/javascripts/jquery.min.js old mode 100644 new mode 100755 diff --git a/app/assets/javascripts/jquery.scrollUp.js b/app/assets/javascripts/jquery.scrollUp.js old mode 100644 new mode 100755 diff --git a/app/assets/javascripts/jquery.sparkline.js b/app/assets/javascripts/jquery.sparkline.js old mode 100644 new mode 100755 diff --git a/app/assets/javascripts/load-image.min.js b/app/assets/javascripts/load-image.min.js old mode 100644 new mode 100755 diff --git a/app/assets/javascripts/moment.js b/app/assets/javascripts/moment.js old mode 100644 new mode 100755 diff --git a/app/assets/javascripts/select2.js b/app/assets/javascripts/select2.js old mode 100644 new mode 100755 diff --git a/app/assets/javascripts/tiny-scrollbar.js b/app/assets/javascripts/tiny-scrollbar.js old mode 100644 new mode 100755 diff --git a/app/assets/javascripts/wysiwyg/bootstrap-wysihtml5.js b/app/assets/javascripts/wysiwyg/bootstrap-wysihtml5.js old mode 100644 new mode 100755 diff --git a/app/assets/javascripts/wysiwyg/locales/bootstrap-wysihtml5.ar-AR.js b/app/assets/javascripts/wysiwyg/locales/bootstrap-wysihtml5.ar-AR.js old mode 100644 new mode 100755 diff --git a/app/assets/javascripts/wysiwyg/locales/bootstrap-wysihtml5.bg-BG.js b/app/assets/javascripts/wysiwyg/locales/bootstrap-wysihtml5.bg-BG.js old mode 100644 new mode 100755 diff --git a/app/assets/javascripts/wysiwyg/locales/bootstrap-wysihtml5.ca-CT.js b/app/assets/javascripts/wysiwyg/locales/bootstrap-wysihtml5.ca-CT.js old mode 100644 new mode 100755 diff --git a/app/assets/javascripts/wysiwyg/locales/bootstrap-wysihtml5.cs-CZ.js b/app/assets/javascripts/wysiwyg/locales/bootstrap-wysihtml5.cs-CZ.js old mode 100644 new mode 100755 diff --git a/app/assets/javascripts/wysiwyg/locales/bootstrap-wysihtml5.de-DE.js b/app/assets/javascripts/wysiwyg/locales/bootstrap-wysihtml5.de-DE.js old mode 100644 new mode 100755 diff --git a/app/assets/javascripts/wysiwyg/locales/bootstrap-wysihtml5.el-GR.js b/app/assets/javascripts/wysiwyg/locales/bootstrap-wysihtml5.el-GR.js old mode 100644 new mode 100755 diff --git a/app/assets/javascripts/wysiwyg/locales/bootstrap-wysihtml5.es-AR.js b/app/assets/javascripts/wysiwyg/locales/bootstrap-wysihtml5.es-AR.js old mode 100644 new mode 100755 diff --git a/app/assets/javascripts/wysiwyg/locales/bootstrap-wysihtml5.es-ES.js b/app/assets/javascripts/wysiwyg/locales/bootstrap-wysihtml5.es-ES.js old mode 100644 new mode 100755 diff --git a/app/assets/javascripts/wysiwyg/locales/bootstrap-wysihtml5.fr-FR.js b/app/assets/javascripts/wysiwyg/locales/bootstrap-wysihtml5.fr-FR.js old mode 100644 new mode 100755 diff --git a/app/assets/javascripts/wysiwyg/locales/bootstrap-wysihtml5.hr-HR.js b/app/assets/javascripts/wysiwyg/locales/bootstrap-wysihtml5.hr-HR.js old mode 100644 new mode 100755 diff --git a/app/assets/javascripts/wysiwyg/locales/bootstrap-wysihtml5.it-IT.js b/app/assets/javascripts/wysiwyg/locales/bootstrap-wysihtml5.it-IT.js old mode 100644 new mode 100755 diff --git a/app/assets/javascripts/wysiwyg/locales/bootstrap-wysihtml5.ja-JP.js b/app/assets/javascripts/wysiwyg/locales/bootstrap-wysihtml5.ja-JP.js old mode 100644 new mode 100755 diff --git a/app/assets/javascripts/wysiwyg/locales/bootstrap-wysihtml5.ko-KR.js b/app/assets/javascripts/wysiwyg/locales/bootstrap-wysihtml5.ko-KR.js old mode 100644 new mode 100755 diff --git a/app/assets/javascripts/wysiwyg/locales/bootstrap-wysihtml5.lt-LT.js b/app/assets/javascripts/wysiwyg/locales/bootstrap-wysihtml5.lt-LT.js old mode 100644 new mode 100755 diff --git a/app/assets/javascripts/wysiwyg/locales/bootstrap-wysihtml5.mo-MD.js b/app/assets/javascripts/wysiwyg/locales/bootstrap-wysihtml5.mo-MD.js old mode 100644 new mode 100755 diff --git a/app/assets/javascripts/wysiwyg/locales/bootstrap-wysihtml5.nb-NB.js b/app/assets/javascripts/wysiwyg/locales/bootstrap-wysihtml5.nb-NB.js old mode 100644 new mode 100755 diff --git a/app/assets/javascripts/wysiwyg/locales/bootstrap-wysihtml5.nl-NL.js b/app/assets/javascripts/wysiwyg/locales/bootstrap-wysihtml5.nl-NL.js old mode 100644 new mode 100755 diff --git a/app/assets/javascripts/wysiwyg/locales/bootstrap-wysihtml5.pl-PL.js b/app/assets/javascripts/wysiwyg/locales/bootstrap-wysihtml5.pl-PL.js old mode 100644 new mode 100755 diff --git a/app/assets/javascripts/wysiwyg/locales/bootstrap-wysihtml5.pt-BR.js b/app/assets/javascripts/wysiwyg/locales/bootstrap-wysihtml5.pt-BR.js old mode 100644 new mode 100755 diff --git a/app/assets/javascripts/wysiwyg/locales/bootstrap-wysihtml5.ru-RU.js b/app/assets/javascripts/wysiwyg/locales/bootstrap-wysihtml5.ru-RU.js old mode 100644 new mode 100755 diff --git a/app/assets/javascripts/wysiwyg/locales/bootstrap-wysihtml5.sk-SK.js b/app/assets/javascripts/wysiwyg/locales/bootstrap-wysihtml5.sk-SK.js old mode 100644 new mode 100755 diff --git a/app/assets/javascripts/wysiwyg/locales/bootstrap-wysihtml5.sv-SE.js b/app/assets/javascripts/wysiwyg/locales/bootstrap-wysihtml5.sv-SE.js old mode 100644 new mode 100755 diff --git a/app/assets/javascripts/wysiwyg/locales/bootstrap-wysihtml5.tr-TR.js b/app/assets/javascripts/wysiwyg/locales/bootstrap-wysihtml5.tr-TR.js old mode 100644 new mode 100755 diff --git a/app/assets/javascripts/wysiwyg/locales/bootstrap-wysihtml5.ua-UA.js b/app/assets/javascripts/wysiwyg/locales/bootstrap-wysihtml5.ua-UA.js old mode 100644 new mode 100755 diff --git a/app/assets/javascripts/wysiwyg/locales/bootstrap-wysihtml5.zh-CN.js b/app/assets/javascripts/wysiwyg/locales/bootstrap-wysihtml5.zh-CN.js old mode 100644 new mode 100755 diff --git a/app/assets/javascripts/wysiwyg/locales/bootstrap-wysihtml5.zh-TW.js b/app/assets/javascripts/wysiwyg/locales/bootstrap-wysihtml5.zh-TW.js old mode 100644 new mode 100755 diff --git a/app/assets/javascripts/wysiwyg/wysihtml5-0.3.0.js b/app/assets/javascripts/wysiwyg/wysihtml5-0.3.0.js old mode 100644 new mode 100755 diff --git a/app/assets/stylesheets/.DS_Store b/app/assets/stylesheets/.DS_Store old mode 100644 new mode 100755 diff --git a/app/assets/stylesheets/alertify.core.scss b/app/assets/stylesheets/alertify.core.scss old mode 100644 new mode 100755 diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss old mode 100644 new mode 100755 diff --git a/app/assets/stylesheets/bootstrap-editable.css b/app/assets/stylesheets/bootstrap-editable.css old mode 100644 new mode 100755 diff --git a/app/assets/stylesheets/calendar-theme.css b/app/assets/stylesheets/calendar-theme.css old mode 100644 new mode 100755 diff --git a/app/assets/stylesheets/charts-graphs.css b/app/assets/stylesheets/charts-graphs.css old mode 100644 new mode 100755 diff --git a/app/assets/stylesheets/fullcalendar.css b/app/assets/stylesheets/fullcalendar.css old mode 100644 new mode 100755 diff --git a/app/assets/stylesheets/main.css b/app/assets/stylesheets/main.css old mode 100644 new mode 100755 diff --git a/app/assets/stylesheets/select2.css b/app/assets/stylesheets/select2.css old mode 100644 new mode 100755 diff --git a/app/assets/stylesheets/style.scss b/app/assets/stylesheets/style.scss old mode 100644 new mode 100755 diff --git a/app/assets/stylesheets/timepicker.css b/app/assets/stylesheets/timepicker.css old mode 100644 new mode 100755 diff --git a/app/assets/stylesheets/wysiwyg/bootstrap-wysihtml5.css b/app/assets/stylesheets/wysiwyg/bootstrap-wysihtml5.css old mode 100644 new mode 100755 diff --git a/app/assets/stylesheets/wysiwyg/wysiwyg-color.css b/app/assets/stylesheets/wysiwyg/wysiwyg-color.css old mode 100644 new mode 100755 diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb old mode 100644 new mode 100755 index e8065d9..0730591 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -1,3 +1,19 @@ class ApplicationController < ActionController::Base - protect_from_forgery + + before_filter :authenticated + helper_method :current_user + + # Our security guy keep talking about sea-surfing, cool story bro. + #protect_from_forgery + + private + + def current_user + @current_user ||= User.find_by_user_id(session[:user_id].to_s) + end + + def authenticated + redirect_to root_url and reset_session if not current_user + end + end diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb old mode 100644 new mode 100755 index 8b04482..d7c9a87 --- a/app/controllers/sessions_controller.rb +++ b/app/controllers/sessions_controller.rb @@ -1,5 +1,7 @@ class SessionsController < ApplicationController - + + skip_before_filter :authenticated, :only => [:new] + def new end diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb new file mode 100755 index 0000000..2ec9ecc --- /dev/null +++ b/app/controllers/users_controller.rb @@ -0,0 +1,4 @@ +class UsersController < ApplicationController + def new + end +end diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb old mode 100644 new mode 100755 diff --git a/app/helpers/sessions_helper.rb b/app/helpers/sessions_helper.rb old mode 100644 new mode 100755 diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb new file mode 100755 index 0000000..2310a24 --- /dev/null +++ b/app/helpers/users_helper.rb @@ -0,0 +1,2 @@ +module UsersHelper +end diff --git a/app/mailers/.gitkeep b/app/mailers/.gitkeep old mode 100644 new mode 100755 diff --git a/app/models/.gitkeep b/app/models/.gitkeep old mode 100644 new mode 100755 diff --git a/app/models/user.rb b/app/models/user.rb new file mode 100755 index 0000000..3778979 --- /dev/null +++ b/app/models/user.rb @@ -0,0 +1,3 @@ +class User < ActiveRecord::Base + attr_accessible :email, :password, :user_id, :admin +end diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb old mode 100644 new mode 100755 index d473fa4..b5ecd7a --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -4,7 +4,7 @@ RailsGoat <%= stylesheet_link_tag "application", :media => "all" %> <%= javascript_include_tag "application" %> - <%= csrf_meta_tags %> + <%#= csrf_meta_tags %>