Commit 8e737ed5 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Dont show remove/modify controls for personal project owner

parent 93e003aa
...@@ -414,6 +414,10 @@ class Project < ActiveRecord::Base ...@@ -414,6 +414,10 @@ class Project < ActiveRecord::Base
imported imported
end end
def personal?
!group
end
def rename_repo def rename_repo
old_path_with_namespace = File.join(namespace_dir, path_was) old_path_with_namespace = File.join(namespace_dir, path_was)
new_path_with_namespace = File.join(namespace_dir, path) new_path_with_namespace = File.join(namespace_dir, path)
......
- user = member.user - user = member.user
- allow_admin = current_user_can_admin_project
%li{id: dom_id(user), class: "team_member_row access-#{member.human_access.downcase}"} %li{id: dom_id(user), class: "team_member_row access-#{member.human_access.downcase}"}
.pull-right .pull-right
- if allow_admin - if current_user_can_admin_project
.pull-left - unless @project.personal? && user == current_user
= form_for(member, as: :team_member, url: project_team_member_path(@project, member.user)) do |f| .pull-left
= f.select :project_access, options_for_select(UsersProject.access_roles, member.project_access), {}, class: "medium project-access-select span2 trigger-submit" = form_for(member, as: :team_member, url: project_team_member_path(@project, member.user)) do |f|
&nbsp; = f.select :project_access, options_for_select(UsersProject.access_roles, member.project_access), {}, class: "medium project-access-select span2 trigger-submit"
= link_to project_team_member_path(@project, user), confirm: remove_from_project_team_message(@project, user), method: :delete, class: "btn-tiny btn btn-remove", title: 'Remove user from team' do &nbsp;
%i.icon-minus.icon-white = link_to project_team_member_path(@project, user), confirm: remove_from_project_team_message(@project, user), method: :delete, class: "btn-tiny btn btn-remove", title: 'Remove user from team' do
%i.icon-minus.icon-white
= image_tag gravatar_icon(user.email, 32), class: "avatar s32" = image_tag gravatar_icon(user.email, 32), class: "avatar s32"
%p %p
%strong= user.name %strong= user.name
......
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
= image_tag gravatar_icon(user.email, 16), class: "avatar s16" = image_tag gravatar_icon(user.email, 16), class: "avatar s16"
%strong= user.name %strong= user.name
%span.cgray= user.username %span.cgray= user.username
- if user == current_user
%span.label.label-success It's you
%span.pull-right %span.pull-right
- if @group.owners.include?(user) - if @group.owners.include?(user)
......
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