{% extends "users/settings_base.html" %} {% block title %} {{ _("Account and Security - %(username)s", username=user.username) }} {% endblock %} {% block ruben_link %} rubenwardy {% endblock %} {% block pane %}

{{ _("Account and Security") }}

{% if form %}

{{ _("Edit Account") }}

{% from "macros/forms.html" import render_field, render_field_prefix, render_submit_field %}
{{ form.hidden_tag() }} {% if user.checkPerm(current_user, "CHANGE_USERNAMES") %} {{ render_field(form.username, tabindex=230) }} {{ render_field(form.display_name, tabindex=230) }} {{ render_field(form.forums_username, tabindex=230) }} {{ render_field_prefix(form.github_username, tabindex=230) }} {% endif %} {% if user.checkPerm(current_user, "CHANGE_RANK") %} {{ render_field(form.rank, tabindex=250) }} {% endif %}

{{ render_submit_field(form.submit, tabindex=280) }}

{% endif %}

{{ _("Password") }}

{% if user == current_user %} {% if user.password %} {{ _("Change Password") }} {% else %} {{ _("Set Password") }} {% endif %} {% else %} {% if user.password %}

{{ _("Has password") }}

{% else %}

{{ _("Doesn't have password") }}

{% endif %} {% endif %}

{{ _("Linked Accounts") }}

Forums {% if user.forums_username %} {{ _("Connected") }} [{{ user.forums_username }}] {% else %} {{ _("Please PM %(rubenwardy)s on the forums to link your account.", rubenwardy=self.ruben_link()) }} {% endif %}
GitHub {% if user.github_username %} {{ _("Connected") }} [{{ user.github_username }}] {% if user == current_user %} {{ _("View ContentDB's GitHub Permissions") }} {% endif %} {% elif user == current_user %} {{ _("Link Github") }} {% else %} {{ _("None") }} {% endif %}
{% if current_user.rank.atLeast(current_user.rank.MODERATOR) %} {{ _("View All") }} {% endif %}

{{ _("Recent Account Actions") }}

{% from "macros/audit_log.html" import render_audit_log %} {{ render_audit_log(user.audit_log_entries.limit(10).all(), current_user) }}

{{ _("Account Deletion and Deactivation") }}

{% if current_user.rank.atLeast(current_user.rank.ADMIN) %} {{ _("Delete or Deactivate") }} {% else %}

{{ _("Account Deletion and Deactivation isn't available to users yet.") }} {{ _("Please contact the admin.") }}

{% endif %} {% endblock %}