summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/controllers/application_controller.rb5
-rw-r--r--app/models/user.rb3
-rw-r--r--app/views/admin/users/_form.html.haml4
-rw-r--r--config/gitlab.yml.example1
-rw-r--r--config/initializers/1_settings.rb1
5 files changed, 1 insertions, 13 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 9a43381f405..2ce87e47f44 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -1,4 +1,3 @@
-class ApplicationController < ActionController::Base
before_filter :authenticate_user!
before_filter :reject_blocked!
before_filter :check_password_expiration
@@ -95,10 +94,6 @@ class ApplicationController < ActionController::Base
return access_denied! unless can?(current_user, :push_code, project)
end
- def authorize_create_team!
- return access_denied! unless can?(current_user, :create_team, nil)
- end
-
def access_denied!
render "errors/access_denied", layout: "errors", status: 404
end
diff --git a/app/models/user.rb b/app/models/user.rb
index a149b3a0322..a0637b522d0 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -47,7 +47,7 @@ class User < ActiveRecord::Base
:extern_uid, :provider, :password_expires_at,
as: [:default, :admin]
- attr_accessible :projects_limit, :can_create_team, :can_create_group,
+ attr_accessible :projects_limit, :can_create_group,
as: :admin
attr_accessor :force_random_password
@@ -208,7 +208,6 @@ class User < ActiveRecord::Base
tap do |u|
u.projects_limit = Gitlab.config.gitlab.default_projects_limit
u.can_create_group = Gitlab.config.gitlab.default_can_create_group
- u.can_create_team = Gitlab.config.gitlab.default_can_create_team
u.theme_id = Gitlab::Theme::MARS
end
end
diff --git a/app/views/admin/users/_form.html.haml b/app/views/admin/users/_form.html.haml
index 1365404edad..3f930c45fa6 100644
--- a/app/views/admin/users/_form.html.haml
+++ b/app/views/admin/users/_form.html.haml
@@ -57,10 +57,6 @@
.controls= f.check_box :can_create_group
.control-group
- = f.label :can_create_team
- .controls= f.check_box :can_create_team
-
- .control-group
= f.label :admin do
%strong.cred Administrator
.controls= f.check_box :admin
diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example
index 59a4d1fd41b..a3661821271 100644
--- a/config/gitlab.yml.example
+++ b/config/gitlab.yml.example
@@ -41,7 +41,6 @@ production: &base
## User settings
default_projects_limit: 10
# default_can_create_group: false # default: true
- # default_can_create_team: false # default: true
# username_changing_enabled: false # default: true - User can change her username/namespace
## Users management
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb
index e0207c6f0fc..92d4a29b7c1 100644
--- a/config/initializers/1_settings.rb
+++ b/config/initializers/1_settings.rb
@@ -52,7 +52,6 @@ Settings['issues_tracker'] ||= {}
Settings['gitlab'] ||= Settingslogic.new({})
Settings.gitlab['default_projects_limit'] ||= 10
Settings.gitlab['default_can_create_group'] = true if Settings.gitlab['default_can_create_group'].nil?
-Settings.gitlab['default_can_create_team'] = true if Settings.gitlab['default_can_create_team'].nil?
Settings.gitlab['host'] ||= 'localhost'
Settings.gitlab['https'] = false if Settings.gitlab['https'].nil?
Settings.gitlab['port'] ||= Settings.gitlab.https ? 443 : 80