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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
1c944a22
Commit
1c944a22
authored
Jun 17, 2016
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't show 'Leave Project' to group members
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
faee4763
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
2 deletions
+21
-2
CHANGELOG
CHANGELOG
+1
-0
app/views/layouts/nav/_project.html.haml
app/views/layouts/nav/_project.html.haml
+3
-2
spec/features/projects/members/group_member_cannot_leave_group_project_spec.rb
...s/members/group_member_cannot_leave_group_project_spec.rb
+17
-0
No files found.
CHANGELOG
View file @
1c944a22
...
...
@@ -14,6 +14,7 @@ v 8.9.0 (unreleased)
background during a refresh.
- Make EmailsOnPushWorker use Sidekiq mailers queue
- Redesign all Devise emails. !4297
- Don't show 'Leave Project' to group members
- Fix wiki page events' webhook to point to the wiki repository
- Don't show tags for revert and cherry-pick operations
- Fix issue todo not remove when leave project !4150 (Long Nguyen)
...
...
app/views/layouts/nav/_project.html.haml
View file @
1c944a22
...
...
@@ -5,18 +5,19 @@
=
icon
(
'cog'
)
=
icon
(
'caret-down'
)
%ul
.dropdown-menu.dropdown-menu-align-right
-
is_project_member
=
@project
.
users
.
exists?
(
current_user
.
id
)
-
access
=
@project
.
team
.
max_member_access
(
current_user
.
id
)
-
can_edit
=
can?
(
current_user
,
:admin_project
,
@project
)
=
render
'layouts/nav/project_settings'
,
access:
access
,
can_edit:
can_edit
-
if
can_edit
||
access
-
if
can_edit
||
is_project_member
%li
.divider
-
if
can_edit
%li
=
link_to
edit_project_path
(
@project
)
do
Edit Project
-
if
access
-
if
is_project_member
%li
=
link_to
polymorphic_path
([
:leave
,
@project
,
:members
]),
data:
{
confirm:
leave_confirmation_message
(
@project
)
},
method: :delete
,
title:
'Leave project'
do
...
...
spec/features/projects/members/group_member_cannot_leave_group_project_spec.rb
0 → 100644
View file @
1c944a22
require
'spec_helper'
feature
'Projects > Members > Group member cannot leave group project'
,
feature:
true
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:group
)
{
create
(
:group
)
}
let
(
:project
)
{
create
(
:project
,
namespace:
group
)
}
background
do
group
.
add_developer
(
user
)
login_as
(
user
)
visit
namespace_project_path
(
project
.
namespace
,
project
)
end
scenario
'user does not see a "Leave project" link'
do
expect
(
page
).
not_to
have_content
'Leave Project'
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