Commit Graph

56 Commits

Author SHA1 Message Date
Rémy Coutable 3855751d02
Merge branch 'jacopo-beschi/gitlab-ce-29712-unnecessary-wait-for-ajax'
See merge request !10567

Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-04-24 18:06:47 +02:00
James Edwards-Jones 2fe0d9f25a Added test to prevent ‘Request access’ regression 2017-04-22 00:18:09 +01:00
Jacopo ff76adb547 Unnecessary "include WaitForAjax" and "include ApiHelpers"
Removed all the unnecessary include of `WaitForAjax` and `ApiHelpers` in the specs.
Removed unnecessary usage of `api:true`
2017-04-21 22:32:02 +02:00
Dmitriy Zaporozhets 5f08760482
Move some project/group members spinach tests to rspec
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2017-04-17 21:03:30 +03:00
Mike Greiling ba6864343b update sub-nav selector in user_requests_access_spec 2017-03-23 11:52:23 -05:00
Jose Ivan Vargas 69b4ec954e fixed user_access_request_spec 2017-03-07 23:26:57 -06:00
Douwe Maan ad640bc5f9 Use Namespace#full_path instead of #path where appropriate 2017-02-23 17:55:01 -06:00
Phil Hughes 12cc9a530c Changed date check test 2017-02-06 09:38:53 +00:00
Phil Hughes 8331036944 Fixed some specs
CHANGELOG item
2017-02-06 09:25:11 +00:00
Jose Ivan Vargas 5ce4883da0 Fixed a test and change the arrow functions to named functions 2017-01-04 18:43:55 -06:00
Jose Ivan Vargas 57b5612aaa Removed the "Groups" option from the settings gear
Fixed more tests
2017-01-03 10:52:14 -06:00
Jose Ivan Vargas def6c43da1 Fixed more rspec tests as well as spinach features 2017-01-03 10:52:14 -06:00
Jose Ivan Vargas 68c730bb99 Fixed rspec tests for the project members also fixed the index
view (removed an extra tag )
2017-01-03 10:52:14 -06:00
Jose Ivan Vargas 4cd139e948 Moved the members (project_members)option to a single controller called members
This controller is going to contain both the project members and groups options
for the settings gear.

Generated the route and modified the routing to point to the new members setting path
2017-01-03 10:52:14 -06:00
Felipe Artur 8275efa36b Fix member with expiration date feature spec 2016-12-19 22:52:10 -02:00
Nur Rony ecea127cd1 Improve test for sort dropdown on members page 2016-12-16 20:30:27 -02:00
Douglas Barbosa Alexandre 0ef2c8dfbe Use factories to create project/group membership on specs 2016-12-16 20:28:40 -02:00
Douglas Barbosa Alexandre 3a2905f507 Sort group/project members alphabetically by default 2016-12-16 20:28:38 -02:00
Douglas Barbosa Alexandre 4b7a3d0c38 Add feature spec for sort functionality on group/project members list 2016-12-16 20:28:38 -02:00
Jacob Schatz ffa1b67d2f Merge branch '23305-leave-project-and-leave-group-should-be-buttons' into 'master'
Remove 'Leave Project' and 'Leave Group' from settings dropdowns

## What does this MR do?

Removes `Leave Project` and `Leave Group` from the settings dropdown.

Adds it to the `views/shared/members/access_request_buttons.html.haml`.

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

## Why was this MR needed?

## Screenshots (if relevant)

![Screen_Shot_2016-11-19_at_15.34.26](/uploads/5c66a025513b4780a9e881f0036381e4/Screen_Shot_2016-11-19_at_15.34.26.png)
![Screen_Shot_2016-11-19_at_15.35.29](/uploads/ed74a5dfe982cf65bb49c0c4fb307061/Screen_Shot_2016-11-19_at_15.35.29.png)

## Does this MR meet the acceptance criteria?

- [x] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- Tests
  - [ ] Added for this feature/bug
  - [x] All builds are passing
- [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [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 it does - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?


Closes #23305

See merge request !7600
2016-12-09 19:27:09 +00:00
Fatih Acet 5bb43bb953 Merge branch 'members-dropdowns' into 'master'
Updated members dropdowns

## What does this MR do?

EE has different dropdowns to allow for group LDAP members to be overridden, this ports the dropdown changes over to reduce conflicts.

## Screenshots (if relevant)

![Screen_Shot_2016-12-07_at_15.28.20](/uploads/6cb6def34015b024dc878aa3b99be4a0/Screen_Shot_2016-12-07_at_15.28.20.png)

See merge request !7974
2016-12-09 18:11:47 +00:00
Phil Hughes fcf332a4fa Group links spec update 2016-12-09 16:39:00 +00:00
Rémy Coutable 96f162125d
Handle an edge-case whith invitees
When the project has invitees, no group members were
returned due to a `user_id NOT IN (42, NULL)` query which
always returned [] since a `user_id` would be NULL, thus the condition
could never match.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-12-07 09:59:52 +01:00
Phil Hughes 89c22ed5af Shows group members in the project members list
Closes #24122
2016-12-02 16:49:53 +00:00
Luke "Jared" Bennett c47d8ab69e
Removed leave buttons from settings dropdowns
Updated specs
2016-11-26 14:27:08 +00:00
Nick Thomas d211011698 Make access request specs explicitly enable or disable access requests as required 2016-11-11 15:45:47 +00:00
Phil Hughes 2a6942abef Merge branch 'master' into members-ui 2016-10-04 11:03:07 +01:00
Rémy Coutable ec0061a95c Allow Member.add_user to handle access requesters
Changes include:

- Ensure Member.add_user is not called directly when not necessary
- New GroupMember.add_users_to_group to have the same abstraction level as for Project
- Refactor Member.add_user to take a source instead of an array of members
- Fix Rubocop offenses
- Always use Project#add_user instead of project.team.add_user
- Factorize users addition as members in Member.add_users_to_source
- Make access_level a keyword argument in GroupMember.add_users_to_group and ProjectMember.add_users_to_projects
- Destroy any requester before adding them as a member
- Improve the way we handle access requesters in Member.add_user
  Instead of removing the requester and creating a new member,
  we now simply accepts their access request. This way, they will
  receive a "access request granted" email.
- Fix error that was previously silently ignored
- Stop raising when access level is invalid in Member, let Rails validation do their work

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-09-28 09:43:00 +02:00
Phil Hughes ecf7640b28 Fixed group_links expire date not updating in view 2016-09-13 08:44:59 +01:00
Phil Hughes 2b41db9215 Search project groups 2016-09-13 08:44:59 +01:00
Phil Hughes 73c4da1780 Fixed removing groups 2016-09-13 08:44:59 +01:00
Phil Hughes 11c0c65092 Expires in test update 2016-09-13 08:44:59 +01:00
Phil Hughes e747626fad Added test for updating groups permissions 2016-09-13 08:44:59 +01:00
Phil Hughes 2c3fa33ca2 Updated some specs
Fixed issue with group name not showing
2016-09-13 08:44:59 +01:00
Phil Hughes 999f184805 Tests update 2016-09-13 08:44:59 +01:00
Sean McGivern 396f85e438 Add expiration date to group memberships 2016-08-18 21:09:17 +01:00
Sean McGivern d649370ac1 Only use let! where needed 2016-08-18 15:02:04 +01:00
Adam Niedzielski 245d4abbbf Single quotes all the way. 2016-08-07 13:42:54 +02:00
Adam Niedzielski 9accb302f6 Set explicit time in tests so they return consistent results regardless of the hour of execution. 2016-08-06 19:09:04 +02:00
Adam Niedzielski f564535579 Allow to edit access expiration date. 2016-08-05 08:36:09 +02:00
Adam Niedzielski 245f237dc8 Update spec for adding member. 2016-08-05 07:52:21 +02:00
Adam Niedzielski d125702800 Add test for a member with the expiration date. 2016-08-03 20:57:09 +02:00
Rémy Coutable 5fb436aaa4 Fix a few nitpicks
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-07-20 14:38:21 +02:00
Felipe Artur 4d69cb9d94 Allow to disable user request access to groups/projects 2016-07-20 14:38:21 +02:00
Rémy Coutable 22ba5d8a7f
New :request_access ability to replace a ugly helper
- Group / project members cannot request access
- Group members cannot request access to a group's project

This addresses an issue where project owners could request access
to their own project, leading to UI inconsistency where their requester
status would replace their owner status.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-07-05 14:35:26 +02:00
Rémy Coutable bd78f5733c Exclude requesters from Project#members, Group#members and User#members
And create new Project#requesters, Group#requesters scopes.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-07-01 17:44:46 +02:00
Douwe Maan 4dcf107b26 Merge branch '18871-check-improve-how-we-display-access-requesters-in-admin-area' into 'master'
Display group/project access requesters separately in admin

## What does this MR do?

It displays the access requesters in a separate list in group & project members pages.

It also harmonize the members counter UI to use `%span.badge` everywhere (in the admin & non-admin members views).

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

No.

## Why was this MR needed?

To not confuse access requesters with actual members.

## What are the relevant issue numbers?

Closes #18871.

## Screenshots

### Group members

| Before | After |
| --------- | ---- |
| ![group-members-before](/uploads/2f15137e073fd3a63bc2cb7b2217cb6c/group-members-before.png) | ![group-members-after](/uploads/5b643974505cfa57783fa0320d3bf8b2/group-members-after.png) |

### Project members

| Before | After |
| --------- | ---- |
| ![project-members-before](/uploads/9c48dcd3736e42de84061b1201ee0b06/project-members-before.png) | ![project-members-after](/uploads/8e04c92ef0bba3de7e2405618632b27d/project-members-after.png) |

### Admin group members

| Before | After |
| --------- | ---- |
| ![admin-group-members-before](/uploads/7fda8c2c94b697bea6655ba892ba45e7/admin-group-members-before.png) | ![admin-group-members-after](/uploads/ea25717001794f75939c679b80308c3a/admin-group-members-after.png) |

### Admin project members

| Before | After |
| --------- | ---- |
| ![admin-project-members-before](/uploads/ba9d3ec52adbda6bb3d45ad9ac5243d3/admin-project-members-before.png) | ![admin-project-members-after](/uploads/3b889a029a9756e9ed2781b45c4dd9cb/admin-project-members-after.png) |

## Does this MR meet the acceptance criteria?

- [x] No CHANGELOG since this is related to the original "request access" MR.
- [ ] 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 !4798
2016-06-22 01:17:08 +00:00
Rémy Coutable 00ac7ae84a
Fix specs
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-06-20 16:40:35 +02:00
Rémy Coutable bceee98713 Show 'Leave project' only if member can actually leave the project
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-06-18 06:06:34 +02:00
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