Commit 059eb92f authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre Committed by Phil Hughes

Use the `ldap?` predicated method

parent e0014e3d
......@@ -35,7 +35,7 @@
%span{ class: ('text-warning' if member.expires_soon?) }
Expires in #{distance_of_time_in_words_to_now(member.expires_at)}
- if member.ldap
- if member.ldap?
%span.label.label-info.pull-right.visible-xs-block
LDAP
......@@ -50,7 +50,7 @@
= time_ago_with_tooltip(member.created_at)
- if show_roles
.controls.member-controls
- if member.ldap
- if member.ldap?
%span.label.label-info.members-ldap.hidden-xs
LDAP
- if show_controls && (member.respond_to?(:group) && @group) || (member.respond_to?(:project) && @project)
......@@ -73,7 +73,7 @@
= link_to role, "javascript:void(0)",
class: ("is-active" if member.access_level == role_id),
data: { id: role_id }
- if member.ldap
- if member.ldap?
%li.divider
%li
= link_to "Revert to LDAP group sync settings", "javascript:void(0)",
......@@ -95,7 +95,7 @@
class: 'btn btn-success prepend-left-10',
title: 'Grant access'
- if can?(current_user, action_member_permission(:destroy, member), member) && !member.ldap
- if can?(current_user, action_member_permission(:destroy, member), member) && !member.ldap?
- if current_user == user
= link_to icon('sign-out', text: 'Leave'), polymorphic_path([:leave, member.source, :members]),
method: :delete,
......@@ -111,7 +111,7 @@
%span.visible-xs-block
Delete
= icon('trash', class: 'hidden-xs')
- elsif member.ldap && can_admin_member
- elsif member.ldap? && can_admin_member
%button.btn.btn-default.btn-ldap-override.js-ldap-permissions{ type: "button",
"aria-label" => "Edit permissions",
data: { name: user.name, id: dom_id(member) } }
......@@ -120,7 +120,7 @@
= icon("pencil", class: "hidden-xs hidden-sm")
- else
%span.member-access-text= member.human_access
- if member.ldap && can_admin_member
- if member.ldap? && can_admin_member
%li.alert.alert-member-ldap{ style: "display: none;" }
%p
= user.name
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment