Commit Graph

26 Commits

Author SHA1 Message Date
Robert Speicher 72a7b30c9f Change all `:empty_project` to `:project` 2017-08-02 17:47:31 -04:00
Rémy Coutable ddccd24c13 Remove superfluous lib: true, type: redis, service: true, models: true, services: true, no_db: true, api: true
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-07-27 14:31:53 +02:00
Grzegorz Bizon 0430b76441 Enable Style/DotPosition Rubocop 👮 2017-06-21 13:48:12 +00:00
Robert Speicher a6ec5121f0 Correct RSpec/SingleLineHook cop offenses 2017-06-14 13:18:56 -05:00
Nick Thomas 5c602e306c Limit non-administrators to adding 100 members at a time to groups and projects 2017-06-06 16:04:26 +01:00
Yorick Peterse bef4879ecc
Fix spec for Members::AuthorizedDestroyService
This spec was still assuming that creating a project would not result in
the owner having access to the project.
2017-05-30 00:35:29 +02:00
Valery Sizov ed86faebe1 Fix: Deleting an invited member causes 500 error 2017-05-18 16:26:39 +03:00
Clement Ho c4094b7ec4 Fix specs 2017-05-04 22:34:15 -05:00
Valery Sizov 36a8cc3eca Remove helpers assigned_issuables_count and cached_assigned_issuables_count 2017-04-20 13:28:04 +03:00
Valery Sizov 59a330f4cd Remove assigned_(issues|merge_requests) methods from the issuable 2017-04-18 21:07:45 +03:00
Valery Sizov 014aca5307 Unassign all Issues and Merge Requests when member leaves team 2017-04-18 11:17:38 +03:00
Robert Speicher ca9a79f620 Use `:empty_project` where possible in service specs 2017-03-27 20:44:09 -04:00
Nick Thomas d211011698 Make access request specs explicitly enable or disable access requests as required 2016-11-11 15:45:47 +00:00
Valery Sizov 921677782f Implement CreateMembers service to make controller thin 2016-11-01 10:17:04 +02:00
Rémy Coutable 61e2b88dd1
Allow Members::ApproveAccessRequestService to accept a new :force param
This param allows to bypass permission check. It is useful for LDAP-sync
where even owners don't have the :admin_group_member permission.

See
6081c37123/app/policies/group_policy.rb (L38)
and https://gitlab.com/gitlab-org/gitlab-ee/issues/1159

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-10-28 15:45:26 +02:00
Robert Speicher ef24c62593 Merge branch 'rc-improve-members-destroy-service' into 'master'
Improve `Members::DestroyService`

Part of #21979.

See merge request !6267
2016-10-04 10:50:21 +00: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
Robert Speicher 4a191c83d1 Enable Lint/StringConversionInInterpolation cop and autocorrect offenses 2016-10-03 16:09:57 +02:00
Robert Speicher 076e040639 Merge branch 'rc-new-members-request-access-service' into 'master'
New `Members::RequestAccessService`

Part of #21979.

See merge request !6265
2016-10-02 11:33:06 +00: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
Rémy Coutable b3f0a82f50 New Members::ApproveAccessRequestService
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-09-22 15:50:47 +02:00
Rémy Coutable 6b02127f03 New Members::RequestAccessService
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-09-22 11:12:17 +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 a08a26ac81 Don't send the "access declined" email on access request withdrawal
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-06-18 05:46:45 +02:00
Rémy Coutable 4652489f40 New Members::DestroyService
This is to ensure we don't send unwanted notifications when deleting a
project. In other words, stop abusing AR callbacks and use services.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-06-18 05:46:45 +02:00