Commit graph

15 commits

Author SHA1 Message Date
Dmitriy Zaporozhets
8fe9995f11
Replace deprecated name_with_namespace with full_name in app and spec
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2018-03-05 16:15:26 +02:00
TM Lee
2cf3fc18a6 Refactor member view by using presenter
- Create MemberPresenter alongside with GroupMemberPresenter and ProjectMemberPresenter
- Make Member model Presentable
- Move action_member_permission from MembersHelper into the MemberPresenter
- Added rspec using double, separate specs for GroupMemberPresenter and ProjectMemberPresenter

Fixes #28004.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-12-11 18:30:56 +01:00
Robert Speicher
72a7b30c9f Change all :empty_project to :project 2017-08-02 17:47:31 -04:00
Robert Speicher
2fe13fbc4b Use :empty_project where possible in helper specs 2017-01-25 17:10:32 -05:00
Ahmad Sherif
916332815e Drop Project#authorized_for_user? in favor of ProjectTeam#member?
Closes #23938
2016-11-23 12:57:58 +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
Rémy Coutable
178e2758f6 Fix specs that requires an access request
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-09-22 11:12:17 +02:00
Douwe Maan
32b579e842 Show member roles to all users on members page 2016-08-11 11:08:07 -05: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
Rémy Coutable
e71ce77e39 Ensure group/project owners can see their members' access_level
When you are the last owner of a group or the owner of a project,
you don't have the :update_<source>_member / :destroy_<source>_member
abilities, but you do have the :admin_<source>_member so you should
be able to see your members access levels.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-06-17 13:03:19 +02:00
Rémy Coutable
b21980bff4 Fix permission checks in member row
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-06-15 18:17: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
d75edf1a98 Factorize access request routes into a new :access_requestable route 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