Skip to content
Snippets Groups Projects

Admin can see, edit and remove user identities

Merged username-removed-444 requested to merge admin-edit-identities into master

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Douwe Maan
    Douwe Maan @DouweM started a thread on the diff
  • 1 %tr
    2 %td
    3 = identity.provider
    4 %td
    5 = identity.extern_uid
    6 %td
    7 = link_to edit_admin_user_identity_path(@user, identity), class: 'btn btn-xs btn-grouped' do
    8 %i.fa.fa-edit
    9 Edit
    10 = link_to [:admin, @user, identity], method: :delete,
    11 class: 'btn btn-xs btn-danger',
    12 data: { confirm: "Are you sure you want to remove this identity" } do
    13 %i.fa.fa-trash
    14 Delete
  • Douwe Maan
    Douwe Maan @DouweM started a thread on the diff
  • 12 def update
    13 if @identity.update_attributes(identity_params)
    14 redirect_to admin_user_identities_path(@user), notice: 'User identity was successfully updated.'
    15 else
    16 render :edit
    17 end
    18 end
    19
    20 def destroy
    21 respond_to do |format|
    22 if @identity.destroy
    23 format.html { redirect_to admin_user_identities_path(@user), notice: 'User identity was successfully removed.' }
    24 else
    25 format.html { redirect_to admin_user_identities_path(@user), alert: 'Failed to remove user identity.' }
    26 end
    27 end
  • Douwe Maan
    Douwe Maan @DouweM started a thread on the diff
  • 1 %h3.page-title
    2 Identities for
    3 = link_to @user.name, [:admin, @user]
    4
    5 %hr
    6 if @identities.present?
    7 %table.table
    • The way tables look in one place and another in the admin area is completely inconsistent, which makes me sad :( But you don't need to change it now, since it will be still be inconsistent anywhere else. At some point we should make an effort to improve this all at once.

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading