Commit Graph

80 Commits

Author SHA1 Message Date
Valery Sizov 3789cfe056 Add a starting date to milestones 2016-11-23 13:41:04 +02:00
Douglas Barbosa Alexandre 198fe1bfc2 Add toggle_subscription action to Groups::LabelsController 2016-11-17 15:10:13 -02:00
gfyoung 579090c3a0 Require projects before creating milestone 2016-11-10 13:54:37 -05: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
Douglas Barbosa Alexandre 355389d065 Disable subscribing to group-level labels 2016-10-19 14:58:28 -02:00
Douglas Barbosa Alexandre 36fee24c80 Limit what label fields we expose on Groups::LabelsController#index 2016-10-19 14:58:26 -02:00
Douglas Barbosa Alexandre f98e97fe78 Reduce duplication between the project and group label forms 2016-10-19 14:58:26 -02:00
Douglas Barbosa Alexandre b10e5764ac List only labels that belongs to the group on the group issues page 2016-10-19 14:58:24 -02:00
Douglas Barbosa Alexandre bdb7bf4b51 List group labels on project labels page 2016-10-19 14:58:24 -02:00
Douglas Barbosa Alexandre 52e0c3b565 Add CRUD for Group Labels 2016-10-19 14:57:15 -02: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
Sean McGivern 396f85e438 Add expiration date to group memberships 2016-08-18 21:09:17 +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
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
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
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
Douglas Barbosa Alexandre bee28e1785 Requires user to be signed in when changing notification settings 2016-04-11 20:50:26 -03:00
Douglas Barbosa Alexandre 93a10f17e0 Reuse `User#notification_settings_for` when it's possible 2016-04-11 20:50:26 -03:00
Douglas Barbosa Alexandre 127119f2c4 Simplify query to retrieve NotificationSetting on controllers 2016-04-08 16:59:06 -03:00
Douglas Barbosa Alexandre 7afeace354 Merge branch 'master' into decouple-member-notification 2016-04-08 15:48:09 -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 5d42803045 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
Dmitriy Zaporozhets 26631f9981 Change how notification settings in profile are rendered and updated
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-03-30 10:44:20 +02:00
Rémy Coutable e989d12b07 Use respond_to instead of a conditional to paginate milestones 2016-03-23 12:02:15 +01:00
Douwe Maan 8db1292139 Tweaks, refactoring, and specs 2016-03-20 21:04:07 +01:00
Zeger-Jan van de Weg b959ae553b Improve group visibility level feature 2016-03-18 16:58:04 -03:00
Mehmet Emin İNAÇ 6a0ea605e8 Change deprecated usage of rendering without response body
`render nothing: true` has been deprecated.
For more information see [pr](https://github.com/rails/rails/pull/20336)
2016-03-16 03:16:25 +02: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
Douwe Maan e3fe3da63d Use project member abilities more extensively 2015-11-17 15:51:40 +01:00
Dmitriy Zaporozhets 32f1a71968
Fix removing avatar for group
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-16 17:24:14 +01:00
Dmitriy Zaporozhets 929ab909c8
Group masters should be able to create/close milestones
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-16 16:14:19 +01:00
Dmitriy Zaporozhets 986695e136 Refactor global and group milestones logic
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-16 14:07:38 +01:00
Dmitriy Zaporozhets 05335a3c85 Create milestones in the group
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-16 14:07:38 +01:00
Douwe Maan 0736f348a6 Use before_actions 2015-07-31 14:15:49 +02:00
Douwe Maan f9bcb9632c Add specific ability for managing group members 2015-07-28 16:32:15 +02:00
Dmitriy Zaporozhets cef746dc94 User should be able to leave group. If not - show him proper message
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-05-29 14:12:30 +02:00
Douwe Maan 92fd3ccee0 Add helpers for header title and sidebar, and move setting those from controllers to layouts. 2015-05-01 10:39:16 +02:00
Douwe Maan a3bd323cd3 Remove an old determine_layout call. 2015-04-30 20:02:00 +02:00
Douwe Maan 26ad250989 Add a page title to every page. 2015-04-30 19:12:15 +02:00