Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
59f75e6c
Commit
59f75e6c
authored
Jun 22, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused accessor
parent
0bc714c2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
9 deletions
+0
-9
app/models/project_team.rb
app/models/project_team.rb
+0
-1
app/models/users_project.rb
app/models/users_project.rb
+0
-8
No files found.
app/models/project_team.rb
View file @
59f75e6c
...
@@ -92,7 +92,6 @@ class ProjectTeam
...
@@ -92,7 +92,6 @@ class ProjectTeam
new_tm
=
tm
.
dup
new_tm
=
tm
.
dup
new_tm
.
id
=
nil
new_tm
.
id
=
nil
new_tm
.
project_id
=
target_project
.
id
new_tm
.
project_id
=
target_project
.
id
new_tm
.
skip_git
=
true
new_tm
new_tm
end
end
...
...
app/models/users_project.rb
View file @
59f75e6c
...
@@ -25,8 +25,6 @@ class UsersProject < ActiveRecord::Base
...
@@ -25,8 +25,6 @@ class UsersProject < ActiveRecord::Base
belongs_to
:user
belongs_to
:user
belongs_to
:project
belongs_to
:project
attr_accessor
:skip_git
validates
:user
,
presence:
true
validates
:user
,
presence:
true
validates
:user_id
,
uniqueness:
{
scope:
[
:project_id
],
message:
"already exists in project"
}
validates
:user_id
,
uniqueness:
{
scope:
[
:project_id
],
message:
"already exists in project"
}
validates
:project_access
,
inclusion:
{
in:
[
GUEST
,
REPORTER
,
DEVELOPER
,
MASTER
]
},
presence:
true
validates
:project_access
,
inclusion:
{
in:
[
GUEST
,
REPORTER
,
DEVELOPER
,
MASTER
]
},
presence:
true
...
@@ -77,7 +75,6 @@ class UsersProject < ActiveRecord::Base
...
@@ -77,7 +75,6 @@ class UsersProject < ActiveRecord::Base
user_ids
.
each
do
|
user_id
|
user_ids
.
each
do
|
user_id
|
users_project
=
UsersProject
.
new
(
project_access:
project_access
,
user_id:
user_id
)
users_project
=
UsersProject
.
new
(
project_access:
project_access
,
user_id:
user_id
)
users_project
.
project_id
=
project_id
users_project
.
project_id
=
project_id
users_project
.
skip_git
=
true
users_project
.
save
users_project
.
save
end
end
end
end
...
@@ -92,7 +89,6 @@ class UsersProject < ActiveRecord::Base
...
@@ -92,7 +89,6 @@ class UsersProject < ActiveRecord::Base
UsersProject
.
transaction
do
UsersProject
.
transaction
do
users_projects
=
UsersProject
.
where
(
project_id:
project_ids
)
users_projects
=
UsersProject
.
where
(
project_id:
project_ids
)
users_projects
.
each
do
|
users_project
|
users_projects
.
each
do
|
users_project
|
users_project
.
skip_git
=
true
users_project
.
destroy
users_project
.
destroy
end
end
end
end
...
@@ -130,8 +126,4 @@ class UsersProject < ActiveRecord::Base
...
@@ -130,8 +126,4 @@ class UsersProject < ActiveRecord::Base
end
end
alias_method
:human_access
,
:project_access_human
alias_method
:human_access
,
:project_access_human
def
skip_git?
!!
@skip_git
end
end
end
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