Commit bbc916baeecfd848eba86dd71c83623a79512a68
1 parent
9fbbd6a6
Exists in
master
and in
4 other branches
If user is owner of project it cant be removed from this project
Showing
3 changed files
with
16 additions
and
6 deletions
Show diff stats
app/models/users_project.rb
app/views/admin/projects/show.html.haml
| @@ -102,6 +102,9 @@ | @@ -102,6 +102,9 @@ | ||
| 102 | %strong | 102 | %strong |
| 103 | = link_to user.name, admin_user_path(user) | 103 | = link_to user.name, admin_user_path(user) |
| 104 | .pull-right | 104 | .pull-right |
| 105 | - %span.light= users_project.human_access | ||
| 106 | - = link_to admin_project_member_path(@project, user), confirm: remove_from_project_team_message(@project, user), method: :delete, class: "btn btn-small btn-remove" do | ||
| 107 | - %i.icon-remove | 105 | + - if users_project.owner? |
| 106 | + %span.light Owner | ||
| 107 | + - else | ||
| 108 | + %span.light= users_project.human_access | ||
| 109 | + = link_to admin_project_member_path(@project, user), confirm: remove_from_project_team_message(@project, user), method: :delete, class: "btn btn-small btn-remove" do | ||
| 110 | + %i.icon-remove |
app/views/admin/users/show.html.haml
| @@ -90,6 +90,9 @@ | @@ -90,6 +90,9 @@ | ||
| 90 | 90 | ||
| 91 | - if tm | 91 | - if tm |
| 92 | .pull-right | 92 | .pull-right |
| 93 | - %span.light= tm.human_access | ||
| 94 | - = link_to admin_project_member_path(project, tm.user), confirm: remove_from_project_team_message(project, @user), method: :delete, class: "btn btn-small btn-remove" do | ||
| 95 | - %i.icon-remove | 93 | + - if tm.owner? |
| 94 | + %span.light Owner | ||
| 95 | + - else | ||
| 96 | + %span.light= tm.human_access | ||
| 97 | + = link_to admin_project_member_path(project, tm.user), confirm: remove_from_project_team_message(project, @user), method: :delete, class: "btn btn-small btn-remove" do | ||
| 98 | + %i.icon-remove |