Commit graph

7 commits

Author SHA1 Message Date
Douwe Maan
33d8972bf9 Merge branch 'fix-18717' into 'master'
Ensure that group owner cannot request access to a project of their group

## What does this MR do?

It fixes two things:

- 91ad995d69e1a0f8991fd896f1d9febc109273fe Ensure that group owner cannot request access to a project of their group
- ec3ff061148d556757e7cd486cdc6083d77acf34 Ensure group/project owners can see their members' access_level (see the commit message for details)

## Are there points in the code the reviewer needs to double check?

Not really, these are pretty simple fixes.

## Why was this MR needed?

Because there was an issue created!

## What are the relevant issue numbers?

Fixes #18717.

## Does this MR meet the acceptance criteria?

- [x] CHANGELOG is not needed since the bug is only present in a 8.9 RC
- [x] Tests
  - [x] Added for this feature/bug
  - [x] All builds are passing
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

See merge request !4729
2016-06-17 22:47:19 +00:00
Rémy Coutable
7c9571a3ba
Address Douwe's feedback
- Make it more explicit that `source` must respond to `#group` and that
`#group` must be present.
- Indent subsequent lines of a multi-line condition.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-06-17 18:37:53 +02:00
Rémy Coutable
b2dc917601 Group owner cannot request access to a project of their group
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-06-17 13:03:19 +02:00
Rémy Coutable
1c944a22de
Don't show 'Leave Project' to group members
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-06-17 12:16:59 +02:00
Rémy Coutable
515205d3c1 UI and copywriting improvements
+ Move 'Edit Project/Group' out of membership-related partial
+ Show the access request buttons only to logged-in users
+ Put the request access buttons out of in a more visible button
+ Improve the copy in the #remove_member_message helper

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-06-14 13:18:14 +02:00
Rémy Coutable
d26f81239a Add request access for groups
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-06-14 13:07:26 +02:00
Rémy Coutable
951e3459e1
Use the can? helper instead of current_user.can?
Fixes #15513.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-04-22 15:48:58 +02:00