Skip to content

Commit

Permalink
Limit colning of projects only to public ones
Browse files Browse the repository at this point in the history
Override grack::auth module to add authentication. If user tries to
clone private ones he will be asked to enter his username and password.
Auth is working, however cloning of private projects is still in
locked downstate.
Cloning of public projects doesn't ask user to login. Only check is that
project exists in our DB.
Push command template for auth is also added.
  • Loading branch information
sonalkr132 committed Jun 13, 2015
1 parent eb6944b commit 3a8e680
Show file tree
Hide file tree
Showing 3 changed files with 104 additions and 313 deletions.
5 changes: 5 additions & 0 deletions config/initializers/0_glitterconfig.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
# ImageMagick geometry to use for thumbnail generation
# defaults to 100 px width
# http://www.imagemagick.org/script/command-line-processing.php#geometry

# used for overriding the grack::auth module of grack gem
require Rails.root.join("lib", "rack", "grack_auth")

Glitter::Application.config.thumbnail_geometry=[50,50]
Glitter::Application.config.inspire_geometry=[230,130]
Glitter::Application.config.mobile_inspire_geometry=[600,340]
Expand Down Expand Up @@ -39,6 +43,7 @@
Glitter::Application.config.repo_path = "#{Rails.root}/public/data/repos"
elsif Rails.env.test?
Glitter::Application.config.repo_dir="public/testdata"
Glitter::Application.config.repo_path = "#{Rails.root}/public/testdata/repos"
elsif Rails.env.production?
Glitter::Application.config.repo_dir="public/data"
Glitter::Application.config.repo_path = "#{ENV["OPENSHIFT_DATA_DIR"]}/repos"
Expand Down
313 changes: 0 additions & 313 deletions lib/rack/git_http.rb

This file was deleted.

Loading

0 comments on commit 3a8e680

Please sign in to comment.