Commit c578fb06 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch '18310-improve-request-access-button' into 'master'

Improve the request / withdraw access button

## What does this MR do?

It implements the design proposed in #18310.

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

No.

## Why was this MR needed?

To close #18310.

## What are the relevant issue numbers?

Closes #18310.

## Screenshots

### Group access request

#### Request button

| Medium | Large |
| ----------- | ------- |
| ![request_access_button](/uploads/a1de370dcbb8ac9a63d2df5c68591db7/request_access_button.png) | ![request_access_button-large](/uploads/0a1c70380268e620a6ca4d3e1661d58c/request_access_button-large.png) |

#### Withdraw request button

| Medium | Large |
| ----------- | ------- |
| ![withdraw_access_request_button](/uploads/c9df39d04b61566ec143d5e9cc43ada2/withdraw_access_request_button.png) | ![withdraw_access_request_button-large](/uploads/10fdaa94d72956e06bdb995e65b51472/withdraw_access_request_button-large.png) |

### Project access request

#### Request button

| Medium | Large |
| ----------- | ------- |
| ![request_access_button](/uploads/8e71395041a5cea996a35df2083bb723/request_access_button.png) | ![project-request_access_button-large](/uploads/adb2dec0eccec8e5171dc0e26e6b03a6/project-request_access_button-large.png) |

#### Withdraw request button

| Medium | Large |
| ----------- | ------- |
| ![withdraw_access_request_button](/uploads/12be06f0a2bf9426a5e043f52c4d1dab/withdraw_access_request_button.png) | ![project-withdraw_access_request_button-large](/uploads/93fda7767ee5f02186c4c954ea346254/project-withdraw_access_request_button-large.png) |

## Does this MR meet the acceptance criteria?

- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- Tests
  - [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 !4860
parents 4bb41c5e 8625bd36
......@@ -32,8 +32,9 @@ v 8.10.0 (unreleased)
- Add basic system information like memory and disk usage to the admin panel
v 8.9.5 (unreleased)
- Fix assigning shared runners as admins
- Show "locked" label for locked runners on runners admin
- Improve the request / withdraw access button. !4860
- Fix assigning shared runners as admins. !4961
- Show "locked" label for locked runners on runners admin. !4961
v 8.9.4
- Fix privilege escalation issue with OAuth external users.
......
......@@ -71,6 +71,10 @@
display: none;
}
.group-right-buttons {
display: none;
}
.container .title {
padding-left: 15px !important;
}
......
......@@ -41,14 +41,17 @@
}
.groups-cover-block {
.container-fluid {
position: relative;
}
.access-request-button {
@include btn-gray;
margin-right: 10px;
text-transform: none;
.group-right-buttons {
position: absolute;
right: 16px;
.btn {
@include btn-gray;
padding: 3px 10px;
background-color: $background-color;
}
}
}
......@@ -266,18 +266,6 @@
@media (max-width: $screen-md-max) {
top: 0;
}
.access-request-button {
position: absolute;
right: 0;
bottom: 61px;
@media (max-width: $screen-md-max) {
position: relative;
bottom: 0;
margin-right: 10px;
}
}
}
@media (max-width: $screen-md-max) {
......
......@@ -15,18 +15,15 @@
%span.visibility-icon.has-tooltip{ data: { container: 'body' }, title: visibility_icon_description(@group) }
= visibility_level_icon(@group.visibility_level, fw: false)
%span.hidden-xs
.group-right-buttons.btn-group
- if current_user
.pull-left.append-right-10= render 'shared/members/access_request_buttons', source: @group
= render 'shared/notifications/button', notification_setting: @notification_setting
- if current_user
.pull-right
= render 'shared/members/access_request_buttons', source: @group
- if @group.description.present?
.cover-desc.description
= markdown(@group.description, pipeline: :description)
%div{ class: container_class }
.top-area
%ul.nav-links
......
......@@ -31,7 +31,7 @@
.project-repo-buttons.btn-group.project-right-buttons
- if current_user
= render 'shared/members/access_request_buttons', source: @project
.pull-left.append-right-10= render 'shared/members/access_request_buttons', source: @project
= render "projects/buttons/download"
= render 'projects/buttons/dropdown'
......
......@@ -7,8 +7,8 @@
= link_to 'Withdraw Access Request', polymorphic_path([:leave, source, :members]),
method: :delete,
data: { confirm: remove_member_message(member) },
class: 'btn access-request-button hidden-xs'
class: 'btn'
- else
= link_to 'Request Access', polymorphic_path([:request_access, source, :members]),
method: :post,
class: 'btn access-request-button hidden-xs'
class: 'btn'
......@@ -51,7 +51,7 @@ If necessary, you can increase the access level of an individual user for a spec
![Barry effectively has 'Master' access to GitLab CI now](groups/override_access_level.png)
## Request access to a group
## Requesting access to a group
As a user, you can request to be a member of a group. Go to the group you'd
like to be a member of, and click the **Request Access** button on the right
......
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