BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
fd166146
Commit
fd166146
authored
Aug 21, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove can_create_team code from user
parent
606701ad
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
1 addition
and
13 deletions
+1
-13
application_controller.rb
app/controllers/application_controller.rb
+0
-5
user.rb
app/models/user.rb
+1
-2
_form.html.haml
app/views/admin/users/_form.html.haml
+0
-4
gitlab.yml.example
config/gitlab.yml.example
+0
-1
1_settings.rb
config/initializers/1_settings.rb
+0
-1
No files found.
app/controllers/application_controller.rb
View file @
fd166146
class
ApplicationController
<
ActionController
::
Base
before_filter
:authenticate_user!
before_filter
:authenticate_user!
before_filter
:reject_blocked!
before_filter
:reject_blocked!
before_filter
:check_password_expiration
before_filter
:check_password_expiration
...
@@ -95,10 +94,6 @@ class ApplicationController < ActionController::Base
...
@@ -95,10 +94,6 @@ class ApplicationController < ActionController::Base
return
access_denied!
unless
can?
(
current_user
,
:push_code
,
project
)
return
access_denied!
unless
can?
(
current_user
,
:push_code
,
project
)
end
end
def
authorize_create_team!
return
access_denied!
unless
can?
(
current_user
,
:create_team
,
nil
)
end
def
access_denied!
def
access_denied!
render
"errors/access_denied"
,
layout:
"errors"
,
status:
404
render
"errors/access_denied"
,
layout:
"errors"
,
status:
404
end
end
...
...
app/models/user.rb
View file @
fd166146
...
@@ -47,7 +47,7 @@ class User < ActiveRecord::Base
...
@@ -47,7 +47,7 @@ class User < ActiveRecord::Base
:extern_uid
,
:provider
,
:password_expires_at
,
:extern_uid
,
:provider
,
:password_expires_at
,
as:
[
:default
,
:admin
]
as:
[
:default
,
:admin
]
attr_accessible
:projects_limit
,
:can_create_
team
,
:can_create_
group
,
attr_accessible
:projects_limit
,
:can_create_group
,
as: :admin
as: :admin
attr_accessor
:force_random_password
attr_accessor
:force_random_password
...
@@ -208,7 +208,6 @@ class User < ActiveRecord::Base
...
@@ -208,7 +208,6 @@ class User < ActiveRecord::Base
tap
do
|
u
|
tap
do
|
u
|
u
.
projects_limit
=
Gitlab
.
config
.
gitlab
.
default_projects_limit
u
.
projects_limit
=
Gitlab
.
config
.
gitlab
.
default_projects_limit
u
.
can_create_group
=
Gitlab
.
config
.
gitlab
.
default_can_create_group
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
u
.
theme_id
=
Gitlab
::
Theme
::
MARS
end
end
end
end
...
...
app/views/admin/users/_form.html.haml
View file @
fd166146
...
@@ -57,10 +57,6 @@
...
@@ -57,10 +57,6 @@
.controls
=
f
.
check_box
:can_create_group
.controls
=
f
.
check_box
:can_create_group
.control-group
.control-group
=
f
.
label
:can_create_team
.controls
=
f
.
check_box
:can_create_team
.control-group
=
f
.
label
:admin
do
=
f
.
label
:admin
do
%strong
.cred
Administrator
%strong
.cred
Administrator
.controls
=
f
.
check_box
:admin
.controls
=
f
.
check_box
:admin
...
...
config/gitlab.yml.example
View file @
fd166146
...
@@ -41,7 +41,6 @@ production: &base
...
@@ -41,7 +41,6 @@ production: &base
## User settings
## User settings
default_projects_limit: 10
default_projects_limit: 10
# default_can_create_group: false # default: true
# 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
# username_changing_enabled: false # default: true - User can change her username/namespace
## Users management
## Users management
...
...
config/initializers/1_settings.rb
View file @
fd166146
...
@@ -52,7 +52,6 @@ Settings['issues_tracker'] ||= {}
...
@@ -52,7 +52,6 @@ Settings['issues_tracker'] ||= {}
Settings
[
'gitlab'
]
||=
Settingslogic
.
new
({})
Settings
[
'gitlab'
]
||=
Settingslogic
.
new
({})
Settings
.
gitlab
[
'default_projects_limit'
]
||=
10
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_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
[
'host'
]
||=
'localhost'
Settings
.
gitlab
[
'https'
]
=
false
if
Settings
.
gitlab
[
'https'
].
nil?
Settings
.
gitlab
[
'https'
]
=
false
if
Settings
.
gitlab
[
'https'
].
nil?
Settings
.
gitlab
[
'port'
]
||=
Settings
.
gitlab
.
https
?
443
:
80
Settings
.
gitlab
[
'port'
]
||=
Settings
.
gitlab
.
https
?
443
:
80
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment