diff options
author | Jason Hollingsworth <jhworth.developer@gmail.com> | 2013-11-06 09:13:21 -0600 |
---|---|---|
committer | Jason Hollingsworth <jhworth.developer@gmail.com> | 2013-11-26 22:22:07 -0600 |
commit | d9bb4230cc3aa161876df821c34d8e9c53d2e7a6 (patch) | |
tree | d9923bbf4ebe3f6cf96f71cdcfe4c07cc94b6752 /db/migrate/20131112220935_add_visibility_level_to_projects.rb | |
parent | 51b5509bacdfba1d3ca84a4b56c6bd21942f1d2e (diff) | |
download | gitlab-ce-d9bb4230cc3aa161876df821c34d8e9c53d2e7a6.tar.gz |
Adding authenticated public mode (internal).
Added visibility_level icons to project view (rather than just text).
Added public projects to search results.
Added ability to restrict visibility levels standard users can set.
Diffstat (limited to 'db/migrate/20131112220935_add_visibility_level_to_projects.rb')
-rw-r--r-- | db/migrate/20131112220935_add_visibility_level_to_projects.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/db/migrate/20131112220935_add_visibility_level_to_projects.rb b/db/migrate/20131112220935_add_visibility_level_to_projects.rb new file mode 100644 index 00000000000..cf1e9f912a0 --- /dev/null +++ b/db/migrate/20131112220935_add_visibility_level_to_projects.rb @@ -0,0 +1,13 @@ +class AddVisibilityLevelToProjects < ActiveRecord::Migration + def self.up + add_column :projects, :visibility_level, :integer, :default => 0, :null => false + Project.where(public: true).update_all(visibility_level: Gitlab::VisibilityLevel::PUBLIC) + remove_column :projects, :public + end + + def self.down + add_column :projects, :public, :boolean, :default => false, :null => false + Project.where(visibility_level: Gitlab::VisibilityLevel::PUBLIC).update_all(public: true) + remove_column :projects, :visibility_level + end +end |