diff options
author | Rémy Coutable <remy@rymai.me> | 2016-07-05 15:24:58 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-07-05 15:35:26 +0300 |
commit | 22ba5d8a7f0920f39ba33bdc4af54531ffe40b1e (patch) | |
tree | 2178ba63c281c892c693f214871b32ab2214a50a /app/views | |
parent | aad62735a4643f851047c11eca9eb188d0ef8c77 (diff) |
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>
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/shared/members/_access_request_buttons.html.haml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/views/shared/members/_access_request_buttons.html.haml b/app/views/shared/members/_access_request_buttons.html.haml index 35dcdccc921..eff914398bb 100644 --- a/app/views/shared/members/_access_request_buttons.html.haml +++ b/app/views/shared/members/_access_request_buttons.html.haml @@ -1,4 +1,4 @@ -- if can_see_request_access_button?(source) +- if can?(current_user, :request_access, source) - if requester = source.requesters.find_by(user_id: current_user.id) = link_to 'Withdraw Access Request', polymorphic_path([:leave, source, :members]), method: :delete, |