Commit Graph

28 Commits

Author SHA1 Message Date
Douglas Barbosa Alexandre 198fe1bfc2 Add toggle_subscription action to Groups::LabelsController 2016-11-17 15:10:13 -02:00
Nick Thomas d211011698 Make access request specs explicitly enable or disable access requests as required 2016-11-11 15:45:47 +00:00
Dmitriy Zaporozhets 1eba14ae2e Refactor create member tests from group_members_controller_spec
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
Dmitriy Zaporozhets fa075771a6
Refactor group_members_controller_spec
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-10-19 14:13:44 +03: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 5dcdf1d51b Ensure Members::ApproveAccessRequestService can fin a requester by ID
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-09-22 15:50:48 +02:00
tiagonbotelho 519275c110 fixes part1 of files to start using active tense 2016-08-09 15:06:23 +01: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
Z.J. van de Weg abca19da8b Use HTTP matchers if possible 2016-06-27 20:10:42 +02:00
Rémy Coutable 909a0ff3ac
Fix and remove duplicate specs
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-06-20 12:36:59 +02:00
Rémy Coutable 724f986fb2 Redirect to the member's source on request withdrawal
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-06-18 05:46:45 +02:00
Felipe Artur 33c61bd461 Re-use notifications dropdown/modal for user profile 2016-06-17 00:17:20 -03:00
Felipe Artur f82ab42d05 Re-use notifications dropdown on user profile 2016-06-16 23:34:21 -03: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
Felipe Artur 09c8cf9de6 Remove group members check 2016-04-18 11:12:28 -03:00
Felipe Artur e8a77c0aee Fix code 2016-04-18 11:12:27 -03:00
Felipe Artur 668d6ffa43 Add specs and fix code 2016-04-18 11:12:27 -03:00
Douglas Barbosa Alexandre aabb466e5b Improve specs for group/project notification controller 2016-04-12 12:10:59 -03:00
Douglas Barbosa Alexandre bee28e1785 Requires user to be signed in when changing notification settings 2016-04-11 20:50:26 -03:00
Felipe Artur 0bef4b9764 Implement review suggestions 2016-04-07 10:59:24 -03:00
Felipe Artur 32c7e42b61 Improve code 2016-04-05 11:53:39 -03:00
Felipe Artur 1ba9a91c6d Fix problem when creating milestones in groups without projects 2016-04-05 11:53:39 -03:00
Douwe Maan 19aa20d528 Fix more specs 2016-03-20 23:09:33 +01:00
Stan Hu d800a949d2 Fix Error 500 when creating global milestones with Unicode characters
Two issues:

1. The constraints in the resources were incorrect. Here's what it was before:
```
group_milestone  GET /groups/:group_id/milestones/:id(.:format)  groups/milestones#show {:id=>/[a-zA-Z.0-9_\-]+(?<!\.atom)/, :group_id=>/[a-zA-Z.0-9_\-]+(?<!\.atom)/}
```

In this case, id is actually the title of the milestone, which can be anything at the moment.

After:

```
group_milestone  GET /groups/:group_id/milestones/:id(.:format)  groups/milestones#show {:id=>/[^\/]+/, :group_id=>/[a-zA-Z.0-9_\-]+(?<!\.atom)/}
```

2. `parameterize` would strip all Unicode characters, leaving a blank string. Rails would report something like:

ActionView::Template::Error (No route matches {:action=>"show", :controller=>"groups/milestones", :group_id=>#<Group id: 48, name: "ops-dev", path: "ops-dev", owner_id: nil, created_at: "2015-11-15 08:55:30", updated_at: "2015-12-02 06:23:26", type: "Group", description: "", avatar: "sha1.c71e73d51af1865c1bbbf6208e10044d46c9bb93.png", public: false>, :id=>"", :title=>"肯定不是中文的问题"} missing required keys: [:id]):

This change uses the babosa library to create a better slug, which surprisingly
isn't actually used by the global milestone controllers. Instead, they use the
title passed as a query string for some reason.

Closes https://github.com/gitlabhq/gitlabhq/issues/9881

Fix constraints
2015-12-05 00:04:44 -08:00
Stan Hu bf4b438459 Fix bug where avatar filenames were not actually deleted from the database during removal.
This would result in a 404 error in certain views.

The `save` call was being rolled back due to an error in the validation step.
Relax the validation step so that this works.

Closes #1570
2015-05-07 10:00:35 -07:00