BigW Consortium Gitlab

Commit fd166146 by Dmitriy Zaporozhets

Remove can_create_team code from user

parent 606701ad
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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment