diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-05-29 16:23:36 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-05-29 16:23:36 +0200 |
commit | 2afa5fcb52b6cec89872fe0794cba651f3ef3c86 (patch) | |
tree | 61ea444b42d4d9c24a886e66a72ee2148d6af4bd /app/helpers/projects_helper.rb | |
parent | 907bbb2b05860be401c77b305721b35a2850ea71 (diff) | |
download | gitlab-ce-2afa5fcb52b6cec89872fe0794cba651f3ef3c86.tar.gz |
Add ability to leave project
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/helpers/projects_helper.rb')
-rw-r--r-- | app/helpers/projects_helper.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index f8df39d236a..94ce6646634 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -294,4 +294,16 @@ module ProjectsHelper nil end end + + def user_max_access_in_project(user, project) + level = project.team.max_member_access(user) + + if level + Gitlab::Access.options_with_owner.key(level) + end + end + + def leave_project_message(project) + "Are you sure you want to leave \"#{project.name}\" project?" + end end |