Commit fd1661468f8132800dec17ad9317d419b1440f5a
1 parent
606701ad
Exists in
master
and in
4 other branches
Remove can_create_team code from user
Showing
5 changed files
with
1 additions
and
13 deletions
Show diff stats
app/controllers/application_controller.rb
| 1 | -class ApplicationController < ActionController::Base | |
| 2 | 1 | before_filter :authenticate_user! |
| 3 | 2 | before_filter :reject_blocked! |
| 4 | 3 | before_filter :check_password_expiration |
| ... | ... | @@ -95,10 +94,6 @@ class ApplicationController < ActionController::Base |
| 95 | 94 | return access_denied! unless can?(current_user, :push_code, project) |
| 96 | 95 | end |
| 97 | 96 | |
| 98 | - def authorize_create_team! | |
| 99 | - return access_denied! unless can?(current_user, :create_team, nil) | |
| 100 | - end | |
| 101 | - | |
| 102 | 97 | def access_denied! |
| 103 | 98 | render "errors/access_denied", layout: "errors", status: 404 |
| 104 | 99 | end | ... | ... |
app/models/user.rb
| ... | ... | @@ -47,7 +47,7 @@ class User < ActiveRecord::Base |
| 47 | 47 | :extern_uid, :provider, :password_expires_at, |
| 48 | 48 | as: [:default, :admin] |
| 49 | 49 | |
| 50 | - attr_accessible :projects_limit, :can_create_team, :can_create_group, | |
| 50 | + attr_accessible :projects_limit, :can_create_group, | |
| 51 | 51 | as: :admin |
| 52 | 52 | |
| 53 | 53 | attr_accessor :force_random_password |
| ... | ... | @@ -208,7 +208,6 @@ class User < ActiveRecord::Base |
| 208 | 208 | tap do |u| |
| 209 | 209 | u.projects_limit = Gitlab.config.gitlab.default_projects_limit |
| 210 | 210 | u.can_create_group = Gitlab.config.gitlab.default_can_create_group |
| 211 | - u.can_create_team = Gitlab.config.gitlab.default_can_create_team | |
| 212 | 211 | u.theme_id = Gitlab::Theme::MARS |
| 213 | 212 | end |
| 214 | 213 | end | ... | ... |
app/views/admin/users/_form.html.haml
| ... | ... | @@ -57,10 +57,6 @@ |
| 57 | 57 | .controls= f.check_box :can_create_group |
| 58 | 58 | |
| 59 | 59 | .control-group |
| 60 | - = f.label :can_create_team | |
| 61 | - .controls= f.check_box :can_create_team | |
| 62 | - | |
| 63 | - .control-group | |
| 64 | 60 | = f.label :admin do |
| 65 | 61 | %strong.cred Administrator |
| 66 | 62 | .controls= f.check_box :admin | ... | ... |
config/gitlab.yml.example
| ... | ... | @@ -41,7 +41,6 @@ production: &base |
| 41 | 41 | ## User settings |
| 42 | 42 | default_projects_limit: 10 |
| 43 | 43 | # default_can_create_group: false # default: true |
| 44 | - # default_can_create_team: false # default: true | |
| 45 | 44 | # username_changing_enabled: false # default: true - User can change her username/namespace |
| 46 | 45 | |
| 47 | 46 | ## Users management | ... | ... |
config/initializers/1_settings.rb
| ... | ... | @@ -52,7 +52,6 @@ Settings['issues_tracker'] ||= {} |
| 52 | 52 | Settings['gitlab'] ||= Settingslogic.new({}) |
| 53 | 53 | Settings.gitlab['default_projects_limit'] ||= 10 |
| 54 | 54 | Settings.gitlab['default_can_create_group'] = true if Settings.gitlab['default_can_create_group'].nil? |
| 55 | -Settings.gitlab['default_can_create_team'] = true if Settings.gitlab['default_can_create_team'].nil? | |
| 56 | 55 | Settings.gitlab['host'] ||= 'localhost' |
| 57 | 56 | Settings.gitlab['https'] = false if Settings.gitlab['https'].nil? |
| 58 | 57 | Settings.gitlab['port'] ||= Settings.gitlab.https ? 443 : 80 | ... | ... |