All files / ee/app/assets/javascripts/members/components/ldap ldap_override_button.vue

100% Statements 5/5
100% Branches 0/0
100% Functions 2/2
100% Lines 5/5

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41  2x 2x 2x                                         1x             19x                  
<script>
import { GlButton, GlTooltipDirective } from '@gitlab/ui';
import { mapActions } from 'vuex';
import { s__ } from '~/locale';
 
export default {
  name: 'LdapOverrideButton',
  i18n: {
    title: s__('Members|Edit permissions'),
  },
  components: { GlButton },
  directives: {
    GlTooltip: GlTooltipDirective,
  },
  inject: ['namespace'],
  props: {
    member: {
      type: Object,
      required: true,
    },
  },
  methods: {
    ...mapActions({
      showLdapOverrideConfirmationModal(dispatch, payload) {
        return dispatch(`${this.namespace}/showLdapOverrideConfirmationModal`, payload);
      },
    }),
  },
};
</script>
 
<template>
  <gl-button
    v-gl-tooltip.hover
    :title="$options.i18n.title"
    :aria-label="$options.i18n.title"
    icon="pencil"
    @click="showLdapOverrideConfirmationModal(member)"
  />
</template>