diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/admin/users_controller.rb | 4 | ||||
-rw-r--r-- | app/controllers/tree_controller.rb | 2 | ||||
-rw-r--r-- | app/models/users_project.rb | 10 | ||||
-rw-r--r-- | app/views/protected_branches/index.html.haml | 2 | ||||
-rw-r--r-- | app/views/repositories/_feed.html.haml | 2 |
5 files changed, 5 insertions, 15 deletions
diff --git a/app/controllers/admin/users_controller.rb b/app/controllers/admin/users_controller.rb index b255c73a21f..8669f5d1d38 100644 --- a/app/controllers/admin/users_controller.rb +++ b/app/controllers/admin/users_controller.rb @@ -19,9 +19,9 @@ class Admin::UsersController < AdminController def team_update @admin_user = User.find(params[:id]) - UsersProject.user_bulk_import( - @admin_user, + UsersProject.add_users_into_projects( params[:project_ids], + [@admin_user.id], params[:project_access] ) diff --git a/app/controllers/tree_controller.rb b/app/controllers/tree_controller.rb index 725f48fa014..2151bd7cbbd 100644 --- a/app/controllers/tree_controller.rb +++ b/app/controllers/tree_controller.rb @@ -22,7 +22,7 @@ class TreeController < ProjectResourceController end def edit - @last_commit = @project.last_commit_for(@ref, @path).sha + @last_commit = @project.repository.last_commit_for(@ref, @path).sha end def update diff --git a/app/models/users_project.rb b/app/models/users_project.rb index 450eb3d59fd..362b1a5d8e5 100644 --- a/app/models/users_project.rb +++ b/app/models/users_project.rb @@ -128,16 +128,6 @@ class UsersProject < ActiveRecord::Base end end - # TODO: depreceate in future in favor of add_users_into_projects - def bulk_import(project, user_ids, project_access) - add_users_into_projects([project.id], user_ids, project_access) - end - - # TODO: depreceate in future in favor of add_users_into_projects - def user_bulk_import(user, project_ids, project_access) - add_users_into_projects(project_ids, [user.id], project_access) - end - def roles_hash { guest: GUEST, diff --git a/app/views/protected_branches/index.html.haml b/app/views/protected_branches/index.html.haml index f408fd16c2c..098f8d55bb3 100644 --- a/app/views/protected_branches/index.html.haml +++ b/app/views/protected_branches/index.html.haml @@ -36,7 +36,7 @@ %td = link_to project_commits_path(@project, branch.name) do %strong= branch.name - - if branch.name == @project.root_ref + - if @project.root_ref?(branch.name) %span.label default %td - if branch.commit diff --git a/app/views/repositories/_feed.html.haml b/app/views/repositories/_feed.html.haml index 496328baca5..44380133718 100644 --- a/app/views/repositories/_feed.html.haml +++ b/app/views/repositories/_feed.html.haml @@ -5,7 +5,7 @@ = link_to project_commits_path(@project, commit.head.name) do %strong = commit.head.name - - if commit.head.name == @project.root_ref + - if @project.root_ref?(commit.head.name) %span.label default %td |