Commit Graph

69 Commits

Author SHA1 Message Date
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
Douglas Barbosa Alexandre e644b8d683 Fix query in Projects::ProjectMembersController to fetch members 2016-12-16 20:30:27 -02:00
Nur Rony 09388b2021 Adds sort dropdown for group members 2016-12-16 20:28:33 -02:00
Rémy Coutable d74ad92630
Use a single query in Projects::ProjectMembersController to fetch members
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-12-08 18:35:59 +01: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 cc66ec2b73 Fixed Ruby to be better for performance
Fixed controls not showing in groups which fixes tests
2016-12-02 16:50:08 +00:00
Phil Hughes 89c22ed5af Shows group members in the project members list
Closes #24122
2016-12-02 16:49:53 +00:00
Valery Sizov 921677782f Implement CreateMembers service to make controller thin 2016-11-01 10:17:04 +02:00
Dmitriy Zaporozhets 7ded7c17d4 Update project member controller to match recent master logic
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-10-24 13:14:00 +03:00
Dmitriy Zaporozhets f5659ac4d1 Add parentheses around return redirect_to method
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-10-24 13:14:00 +03:00
Dmitriy Zaporozhets c82278898d Refactor groups/projects members controller
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-10-24 13:14:00 +03:00
Linus G Thiel 036fac06d1 Gracefully handle adding of no users to projects and groups
- Disable {project, group} members submit button if no users

  If no users are selected, the submit button should be disabled.

- Alert user when no users were added to {project, group}.

  When no users were selected for adding, an alert message is
  flashed that no users were added.

- Also, this commit adds a feedback when users were actually added to a
  project, in symmetry with how group members are handled.

Closes #22967, #23270.
2016-10-24 13:14:00 +03:00
Phil Hughes 50288a6ace Removed code from project members controller
This code was meant to be added to another branch as an expirement, but instead was commited to wrong branch
2016-10-20 11:35:29 +01:00
Phil Hughes 6865c46c66 Changed how collections are rendered
Used variables in haml for replicated checks
Fixed broken conflict
2016-10-06 15:41:00 +01:00
Phil Hughes 996e802415 Merge branch 'master' into members-ui 2016-10-06 15:30:34 +01:00
Phil Hughes a0eaff1412 Updated Ruby variable name
Fixed Ruby code based on review feedback
2016-10-05 14:37:03 +01:00
Phil Hughes c2602aaff3 Updated Ruby 2016-10-04 14:40:03 +01:00
Phil Hughes 2a6942abef Merge branch 'master' into members-ui 2016-10-04 11:03:07 +01:00
Rémy Coutable c8b1311934 Fix a few things after the initial improvment to Members::DestroyService
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-10-03 16:57:48 +02:00
Rémy Coutable 3158f57dba Improve Members::DestroyService
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-10-03 16:57:48 +02:00
Rémy Coutable 924a6b7d33 New AccessRequestsFinder
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-09-28 08:46:59 +02:00
Phil Hughes aac80d76c2 Group links search test fix 2016-09-13 08:44:59 +01:00
Phil Hughes b61cd8a393 Added back ordering 2016-09-13 08:44:59 +01:00
Phil Hughes 7cca8ffe60 Ruby update 2016-09-13 08:44:59 +01:00
Phil Hughes 2abbb0980f Removed group members from the list for now 2016-09-13 08:44:59 +01:00
Phil Hughes 401b797671 Fixed bug when group_ids not present when creating 2016-09-13 08:44:59 +01:00
Phil Hughes 2b41db9215 Search project groups 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 931d09f481 Fixed search 2016-09-13 08:44:59 +01:00
Phil Hughes 3e19f1976f Fixed issue with invited users not showing up 2016-09-13 08:44:59 +01:00
Phil Hughes cdc55db345 Fixed members error 2016-09-13 08:44:59 +01:00
Phil Hughes e477ad4456 Removes row from dom when deleting
Fixed spacing with buttons
Disables group form when user doesnt have correct permissions
2016-09-13 08:44:59 +01:00
Phil Hughes e33cda96cb Fixed group members not deleting
Combine both group members & project members in project members list
2016-09-13 08:44:59 +01:00
Phil Hughes 23993147fb Fixed issue with groups not displaying 2016-09-13 08:44:59 +01:00
Phil Hughes 4afd17b278 Included groups on project_members page 2016-09-13 08:44:59 +01:00
Adam Niedzielski f564535579 Allow to edit access expiration date. 2016-08-05 08:36:09 +02:00
Adam Niedzielski b2c8dc6f35 Replace optional parameters with keyword arguments. 2016-08-02 20:37:22 +02:00
Adam Niedzielski 6d92cd3e83 WIP 2016-08-01 20:12:30 +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
Rémy Coutable 654565c9dc Raise a new Gitlab::Access::AccessDeniedError when permission is not enough to destroy a member
This is a try for a new approach to put the access checks at the service level.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-06-18 06:06:34 +02:00
Rémy Coutable 6c5b2377f7 Use the new Members::DestroyService in group/project member controllers
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-06-18 05:46:45 +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 d71fbe0dbd Factorize #request_access and #approve_access_request into a new AccessRequestActions controller concern
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-06-14 13:07:26 +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
David Alexander 17c22156c5 Initial implementation of user access request to projects 2016-06-14 12:12:02 +02:00
Dmitriy Zaporozhets 253a017b01
Merge branch 'meinac/gitlab-ce-change_deprecated_render_usage'
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-05-18 12:48:23 -05:00
Felipe Artur eb99e5f5c1 Remove unused authorization from controller 2016-04-20 10:57:31 -03:00
Felipe Artur 62f6601c59 Show project members only for members 2016-04-18 17:53:34 -03:00
Grzegorz Bizon bb9c194c23 Respond 404 when unauthorized user imports members 2016-04-05 14:37:06 +02:00
Grzegorz Bizon c52b5c92fb Do not leak project exists when importing members
When importing members, and user does not have permissions to read
members in a source project, do not leak information about source
project existence. Notifiy user that project has not been found instead.
2016-04-05 13:55:15 +02:00