-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Block/Close and wipe data for all accounts on local pod in admin UI #8249
Open
tclaus
wants to merge
2
commits into
diaspora:develop
Choose a base branch
from
tclaus:7464_7463_close_remote_accounts
base: develop
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,131 +1,90 @@ | ||
%li.user.media | ||
.media-left | ||
- if user.person | ||
.media-object | ||
= person_image_tag(user.person, size: :thumb_small) | ||
.media-object | ||
= person_image_tag(person, size: :thumb_small) | ||
.media-body | ||
.row | ||
.col-sm-7 | ||
%h4.media-heading | ||
= user.try(:person).try(:name) | ||
= person.diaspora_handle | ||
= t(".remote") if person.remote? | ||
= t(".local") if person.local? | ||
%br | ||
- if person.closed_account? | ||
.label.label-danger | ||
= t(".closed_account") | ||
- elsif person.locked_access? | ||
.label.label-warning | ||
= t(".locked_account") | ||
- if !person.closed_account? && !person.locked_access? | ||
.label.label-success | ||
= t(".active_account") | ||
.col-sm-5 | ||
.pull-right | ||
%span.label.label-default | ||
= t(".id") | ||
= user.id | ||
= person.id | ||
%span.label.label-info | ||
= t(".guid") | ||
= user.try(:person).try(:guid) | ||
= person.guid | ||
.row | ||
.col-sm-8 | ||
%dl.dl-horizontal | ||
%dt= t("username") | ||
%dd= user.username | ||
%dt= t(".email") | ||
%dd= user.email | ||
%dt= t(".diaspora_handle") | ||
%dd= user.person.diaspora_handle | ||
%dt= t(".last_seen") | ||
%dd= user.last_seen || t(".unknown") | ||
%dt= t(".current_sign_in_ip") | ||
%dd= user.current_sign_in_ip || t(".unknown") | ||
- if user.invited_by.present? | ||
%dt= t(".invite_token") | ||
%dd= invite_code_url(user.invited_by.invitation_code) | ||
%dt= t(".account_closed") | ||
%dd | ||
- if user.person.closed_account | ||
%span.label.label-warning= t(".yes") | ||
- else | ||
%span.label.label-success= t(".no") | ||
%dd= person.username | ||
- if person.owner.present? | ||
%dt= t(".email") | ||
%dd= person.owner.email | ||
%dt= t(".first_seen") | ||
%dd= person.owner.created_at || t(".unknown") | ||
%dt= t(".last_seen") | ||
%dd= person.owner.last_seen || t(".unknown") | ||
%dt= t(".current_sign_in_ip") | ||
%dd= person.owner.current_sign_in_ip || t(".unknown") | ||
- if person.owner.invited_by.present? | ||
%dt= t(".invite_token") | ||
%dd= invite_code_url(person.owner.invited_by.invitation_code) | ||
%dt= t(".nsfw") | ||
%dd | ||
- if user.person.profile.nsfw | ||
- if person.profile.nsfw | ||
%span.label.label-warning= t(".yes") | ||
- else | ||
%span.label.label-success= t(".no") | ||
%dt= t(".admin") | ||
%dd | ||
- if user.admin? | ||
%span.label.label-success= t(".yes") | ||
- else | ||
%span.label.label-warning= t(".no") | ||
%dt= t(".moderator") | ||
%dd | ||
- if user.moderator_only? | ||
%span.label.label-success= t(".yes") | ||
- else | ||
%span.label.label-warning= t(".no") | ||
%dt= t(".spotlight") | ||
%dd | ||
- if user.spotlight? | ||
%span.label.label-success= t(".yes") | ||
- else | ||
%span.label.label-warning= t(".no") | ||
|
||
- if person.owner.present? | ||
%dt= t(".admin") | ||
%dd | ||
- if person.owner.admin? | ||
%span.label.label-success= t(".yes") | ||
- else | ||
%span.label.label-warning= t(".no") | ||
%dt= t(".moderator") | ||
%dd | ||
- if person.owner.moderator? | ||
%span.label.label-success= t(".yes") | ||
- else | ||
%span.label.label-warning= t(".no") | ||
%dt= t(".spotlight") | ||
%dd | ||
- if person.owner.spotlight? | ||
%span.label.label-success= t(".yes") | ||
- else | ||
%span.label.label-warning= t(".no") | ||
%h4= t("layouts.header.profile") | ||
|
||
%dl.dl-horizontal | ||
%dt= t("people.profile_sidebar.born") | ||
%dd= user.person.profile.birthday | ||
%dd= person.profile.birthday | ||
%dt= t("people.profile_sidebar.gender") | ||
%dd= user.person.profile.gender | ||
%dd= person.profile.gender | ||
%dt= t("people.profile_sidebar.location") | ||
%dd= user.person.profile.location | ||
%dd= person.profile.location | ||
%dt= t("people.profile_sidebar.bio") | ||
%dd= user.person.profile.bio | ||
%dd= person.profile.bio | ||
|
||
.col-sm-4 | ||
= link_to t("admins.user_search.view_profile"), | ||
person_path(user.person), | ||
class: "btn btn-default btn-block" | ||
= link_to t("admins.user_search.add_invites"), | ||
add_invites_path(user.invitation_code), | ||
class: "btn btn-info btn-block" | ||
- unless user.person.closed_account | ||
= link_to t("admins.user_search.close_account"), | ||
admin_close_account_path(user), | ||
method: :post, data: {confirm: t("admins.user_search.are_you_sure")}, | ||
class: "btn btn-danger btn-block" | ||
- if user.access_locked? | ||
= link_to t("admins.user_search.unlock_account"), | ||
admin_unlock_account_path(user), | ||
method: :post, | ||
data: {confirm: t("admins.user_search.are_you_sure_unlock_account")}, | ||
class: "btn btn-danger btn-block" | ||
- else | ||
= link_to t("admins.user_search.lock_account"), | ||
admin_lock_account_path(user), | ||
method: :post, | ||
data: {confirm: t("admins.user_search.are_you_sure_lock_account")}, | ||
class: "btn btn-danger btn-block" | ||
- if Role.is_admin?(user.person) | ||
= link_to t("admins.user_search.remove_admin"), | ||
admin_remove_admin_path(user), | ||
method: :post, | ||
class: "btn btn-danger btn-block" | ||
- else | ||
= link_to t("admins.user_search.make_admin"), | ||
admin_make_admin_path(user), | ||
method: :post, | ||
class: "btn btn-info btn-block" | ||
- if Role.moderator_only?(user.person) | ||
= link_to t("admins.user_search.remove_moderator"), | ||
admin_remove_moderator_path(user), | ||
method: :post, | ||
class: "btn btn-danger btn-block" | ||
- else | ||
= link_to t("admins.user_search.make_moderator"), | ||
admin_make_moderator_path(user), | ||
method: :post, | ||
class: "btn btn-info btn-block" | ||
- if Role.spotlight?(user.person) | ||
= link_to t("admins.user_search.remove_spotlight"), | ||
admin_remove_spotlight_path(user), | ||
method: :post, | ||
class: "btn btn-danger btn-block" | ||
- else | ||
= link_to t("admins.user_search.make_spotlight"), | ||
admin_make_spotlight_path(user), | ||
method: :post, | ||
class: "btn btn-info btn-block" | ||
= render partial: "admins/user_entry/view_profile", locals: {person: person} | ||
= render partial: "admins/user_entry/add_invites", locals: {person: person} | ||
= render partial: "admins/user_entry/lock_action", locals: {person: person} | ||
= render partial: "admins/user_entry/close_action", locals: {person: person} | ||
= render partial: "admins/user_entry/admin_action", locals: {person: person} | ||
= render partial: "admins/user_entry/moderator_action", locals: {person: person} | ||
= render partial: "admins/user_entry/spotlight_action", locals: {person: person} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
- if person.owner.present? && !person.closed_account? | ||
= link_to t("admins.user_search.add_invites"), | ||
add_invites_path(person.user_id), | ||
class: "btn btn-info btn-block" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
- if person.owner.present? && person != @current_user.person && !person.closed_account? | ||
- if Role.is_admin?(person) | ||
= link_to t("admins.user_search.remove_admin"), | ||
admin_remove_admin_path(person.user_id), | ||
method: :post, | ||
class: "btn btn-danger btn-block" | ||
- else | ||
= link_to t("admins.user_search.make_admin"), | ||
admin_make_admin_path(person.user_id), | ||
method: :post, | ||
class: "btn btn-info btn-block" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
- if person != @current_user.person && !person.closed_account? | ||
= link_to person.owner.present? ? t("admins.user_search.close_account") : t("admins.user_search.close_local_account"), | ||
admin_close_account_path(person.id), | ||
method: :post, data: {confirm: t("admins.user_search.are_you_sure")}, | ||
class: "btn btn-danger btn-block" | ||
= link_to person.owner.present? ? t("admins.user_search.wipe_and_close_account") : t("admins.user_search.wipe_and_close_local_account"), | ||
admin_wipe_and_close_account_path(person.id), | ||
method: :post, data: {confirm: t("admins.user_search.are_you_sure_close_and_wipe_account")}, | ||
class: "btn btn-danger btn-block" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long. [138/120]