diff --git a/docs/deployment.md b/docs/deployment.md index a5c7238..4057fa8 100644 --- a/docs/deployment.md +++ b/docs/deployment.md @@ -498,12 +498,12 @@ sudo journalctl -u coulobre-panel -u coulobre-worker -u coulobre-beat ## Manage panel roles -A verified superuser can assign a Customer or Customer manager role to an -active login from **Customers** or **Customer managers**. Choose **Assign +A verified superuser can assign a Customer or Manager role to an +active login from **Customers** or **Managers**. Choose **Assign to existing login** and enter the username. Customer roles use their own -assigned hosting accounts. Customer managers use their own hosting account +assigned hosting accounts. Managers use their own hosting account assignments and hosting plan policy. New manager assignments use the default -customer manager profile when one is configured. +manager profile when one is configured. Logins with multiple roles can choose **Panel role** in the account area. The role applies to the session, including direct page requests and actions. @@ -784,7 +784,7 @@ loaded as long as any existing managed login uses it. Use the in-place procedure above with the v0.10 source release. Keep a copy of the v0.9 release and a matching database and configuration backup for -rollback. The upgrade adds tables for invitations and customer manager +rollback. The upgrade adds tables for invitations and manager profiles, and initializes the new web setup flags without running provisioning for existing accounts. @@ -1273,7 +1273,7 @@ sudo systemctl enable --now coulobre-database-provisioner.service ``` Select **Add database** on a hosting account to queue its provisioning. -Customers can add databases on their own accounts. Customer managers need +Customers can add databases on their own accounts. Managers need permission to manage resources for their assigned accounts. For a pending request, an operator can select **Provision database**. Operators need permission to view hosting accounts and databases and the **Can add database diff --git a/docs/security.md b/docs/security.md index b1ae06d..b159fe0 100644 --- a/docs/security.md +++ b/docs/security.md @@ -18,7 +18,7 @@ after users have a way to update. - Serve the panel over HTTPS. If you use a reverse proxy, restrict the private origin to that proxy and let the managed Apache configuration set the forwarding headers. Keep debug mode off on shared or public hosts. -- Require two-factor authentication for staff and customer managers. Use an +- Require two-factor authentication for staff and managers. Use an authenticator app for administrative accounts and keep recovery codes in a protected location. The **My account** page lets users verify a new email address, replace their authenticator, renew recovery codes, and revoke diff --git a/src/coulobre/hosting/access.py b/src/coulobre/hosting/access.py index 14515f2..0525105 100644 --- a/src/coulobre/hosting/access.py +++ b/src/coulobre/hosting/access.py @@ -7,21 +7,6 @@ class PanelRole(StrEnum): CUSTOMER = "customer" -NAVIGATION_SECTIONS = { - "accounts": "accounts", - "retired-accounts": "accounts", - "databases": "accounts", - "dns-zones": "accounts", - "mailboxes": "accounts", - "mail-domains": "accounts", - "customers": "customers", - "resellers": "resellers", - "hosting-plans": "hosting_plans", - "plans": "plans", - "service-health": "service_health", -} - - def customer_for_user(user): role = getattr(user, "panel_role", None) if role is not None and role != PanelRole.CUSTOMER: @@ -62,33 +47,37 @@ def manages_account(user, account): def panel_access(request): customer = customer_for_user(request.user) is not None reseller = not customer and reseller_for_user(request.user) is not None - match = request.resolver_match - section = None - if match is not None and match.namespace == "panel": - section = NAVIGATION_SECTIONS.get( - match.route.split("/", 1)[0], match.url_name - ) + from .workspaces import CUSTOMER_ACCOUNT, groups_for, workspace_accounts + operator = request.user.is_authenticated and not (customer or reseller) - grouped = reseller or ( - operator - and sum( - request.user.has_perm(f"hosting.view_{resource}") - for resource in ( - "hostingaccount", - "customer", - "reseller", - "hostingplan", - ) - ) - > 1 + groups = groups_for(request, customer=customer, manager=reseller) + current = next( + ( + label + for label, links in groups + if any(url == request.path for url, _ in links) + ), + "", ) + selected = request.session.get(CUSTOMER_ACCOUNT) + available = [] + if customer and not getattr(request, "impersonation", None): + available = list( + workspace_accounts(request.user) + .only("id", "primary_domain") + .order_by("primary_domain") + ) + if available and selected not in {account.pk for account in available}: + selected = available[0].pk return { "is_customer": customer, "is_reseller": reseller, "is_tenant": customer or reseller, "is_operator": operator, - "group_customer_navigation": grouped, - "panel_section": section, + "navigation_groups": groups, + "open_workspace_group": current, + "workspace_accounts": available if len(available) > 1 else [], + "workspace_selected": selected, } diff --git a/src/coulobre/hosting/account_administration.py b/src/coulobre/hosting/account_administration.py new file mode 100644 index 0000000..91be61c --- /dev/null +++ b/src/coulobre/hosting/account_administration.py @@ -0,0 +1,353 @@ +from django import forms +from django.contrib import messages +from django.contrib.admin.models import ADDITION, LogEntry +from django.contrib.auth import get_user_model, password_validation +from django.contrib.auth.forms import UserCreationForm +from django.contrib.auth.mixins import ( + PermissionRequiredMixin, + UserPassesTestMixin, +) +from django.core.exceptions import ValidationError +from django.db import IntegrityError, transaction +from django.db.models import Count, Q +from django.shortcuts import redirect +from django.urls import reverse_lazy +from django.views.generic import FormView, ListView + +from coulobre.domain_names import canonical_domain + +from .access import OperatorOnlyMixin, reseller_for_user +from .account_setup import setup_new_account +from .dns_defaults import zone_defaults +from .installation_features import ( + default_dns_zones_allowed, + panel_feature_allowed, +) +from .invitations import InviteLoginForm, queue_invitation +from .models import Customer, HostingAccount, HostingPlan, Reseller +from .reseller_accounts import ( + create_reseller_account, + lock_resellers, + save_operator_account, +) +from .resource_requests import lock_hosting_account, require_open_account + + +class ManagerOnboardingForm(InviteLoginForm): + primary_domain = HostingAccount._meta.get_field( + "primary_domain" + ).formfield(required=True) + plan = forms.ModelChoiceField( + queryset=HostingPlan.objects.none(), label="Hosting plan" + ) + manage_dns = forms.BooleanField( + required=False, label="Manage DNS in Coulobre" + ) + manage_mail = forms.BooleanField( + required=False, label="Manage email in Coulobre" + ) + send_invitation = forms.BooleanField( + required=False, initial=True, label="Send a welcome email" + ) + welcome_message = forms.CharField( + required=False, + max_length=2000, + widget=forms.Textarea(attrs={"rows": 3}), + label="Message to include in the welcome email", + ) + initial_password = forms.CharField( + required=False, + strip=False, + max_length=256, + widget=forms.PasswordInput, + label="Initial password", + help_text="Leave blank to use a password setup link.", + ) + + def __init__(self, *args, manager, defaults, **kwargs): + super().__init__(*args, **kwargs) + self.fields["plan"].queryset = manager.hosting_plans.order_by("name") + self.fields["manage_dns"].disabled = not default_dns_zones_allowed( + defaults + ) + self.fields["manage_mail"].disabled = not panel_feature_allowed( + "LOCAL_MAILBOX_PROVISIONING" + ) + + def clean_primary_domain(self): + try: + domain = canonical_domain(self.cleaned_data["primary_domain"]) + except ValueError as error: + raise ValidationError(str(error)) from error + if HostingAccount.objects.filter(primary_domain=domain).exists(): + raise ValidationError( + "This domain already belongs to a hosting account." + ) + return domain + + def clean(self): + cleaned = super().clean() + password = cleaned.get("initial_password") + if password: + if cleaned.get("send_invitation"): + self.add_error( + "initial_password", + "The welcome email uses a password setup link. Leave " + "this field blank to send it.", + ) + try: + password_validation.validate_password(password, self.instance) + except ValidationError as error: + self.add_error("initial_password", error) + return cleaned + + +class ManagerOnboardingView(UserPassesTestMixin, FormView): + form_class = ManagerOnboardingForm + template_name = "hosting/workspace_form.html" + extra_context = { + "title": "Add a new user", + "submit_label": "Create customer and hosting account", + "invitation_preview": True, + } + + def test_func(self): + self.manager = reseller_for_user(self.request.user) + return self.manager is not None + + def get_form_kwargs(self): + return super().get_form_kwargs() | { + "manager": self.manager, + "defaults": zone_defaults(), + } + + def form_valid(self, form): + data = form.cleaned_data + try: + with transaction.atomic(): + user = form.save(commit=False) + if data["initial_password"]: + user.set_password(data["initial_password"]) + user.save() + customer = Customer.objects.create( + user=user, reseller=self.manager + ) + account = HostingAccount( + name=user.get_username(), + primary_domain=data["primary_domain"], + customer=customer, + hosting_plan=data["plan"], + ) + create_reseller_account(self.manager, account) + defaults = zone_defaults() + setup_new_account( + account, + { + "setup_website": panel_feature_allowed( + "LOCAL_WEB_ACTIVATION" + ), + "setup_dns": data["manage_dns"], + "setup_email": data["manage_mail"], + "setup_www": defaults.include_www, + "setup_wildcard": defaults.include_wildcard, + }, + ) + if data["send_invitation"]: + queue_invitation( + user, welcome_message=data["welcome_message"] + ) + except ValidationError as error: + form.add_error(None, ValidationError(error.messages)) + return self.form_invalid(form) + except IntegrityError: + if not ( + HostingAccount.objects.filter( + primary_domain=data["primary_domain"] + ).exists() + or get_user_model() + .objects.filter(username__iexact=data["username"]) + .exists() + ): + raise + form.add_error(None, "The username or domain is already in use.") + return self.form_invalid(form) + messages.success( + self.request, "The customer and hosting account were created." + ) + return redirect(account) + + +class ManagerPackagesView(UserPassesTestMixin, ListView): + template_name = "hosting/manager_packages.html" + context_object_name = "plans" + + def test_func(self): + self.manager = reseller_for_user(self.request.user) + return self.manager is not None + + def get_queryset(self): + return self.manager.hosting_plans.order_by("name") + + +class AllUsersView(OperatorOnlyMixin, PermissionRequiredMixin, ListView): + permission_required = "hosting.view_customer" + template_name = "hosting/all_users.html" + context_object_name = "logins" + paginate_by = 40 + + def get_queryset(self): + profiles = [Q(hosting_customer__isnull=False)] + if self.request.user.has_perm("hosting.view_reseller"): + profiles.append( + Q(hosting_reseller__isnull=False, is_superuser=False) + ) + if self.request.user.is_superuser: + profiles.append(Q(is_superuser=True)) + scope = Q() + for profile in profiles: + scope |= profile + return ( + get_user_model() + .objects.filter(scope) + .filter(username__icontains=self.request.GET.get("q", "")[:150]) + .select_related( + "hosting_customer__reseller__user", "hosting_reseller" + ) + .annotate( + account_count=Count( + "hosting_customer__hostingaccount", + filter=Q( + hosting_customer__hostingaccount__retired_at__isnull=True + ), + distinct=True, + ) + ) + .order_by("username") + ) + + +class OperatorAuthorization(UserPassesTestMixin): + def test_func(self): + user = self.request.user + return user.is_superuser and user.is_verified() + + +class OperatorLoginForm(UserCreationForm): + email = forms.EmailField() + + class Meta(UserCreationForm.Meta): + fields = ("username", "email") + + +class OperatorCreateView(OperatorAuthorization, FormView): + form_class = OperatorLoginForm + template_name = "hosting/workspace_form.html" + success_url = reverse_lazy("panel:all_users") + extra_context = { + "title": "Add an operator", + "submit_label": "Create operator", + } + + @transaction.atomic + def form_valid(self, form): + user = form.save(commit=False) + user.is_staff = user.is_superuser = True + user.save() + from .panel_roles import ensure_operator_manager + + ensure_operator_manager(user) + LogEntry.objects.log_actions( + self.request.user.pk, [user], ADDITION, "Created panel operator." + ) + return super().form_valid(form) + + +class MoveHostingForm(forms.Form): + account = forms.ModelChoiceField( + queryset=HostingAccount.objects.filter( + retired_at__isnull=True + ).select_related("reseller__user") + ) + manager = forms.ModelChoiceField( + queryset=Reseller.objects.filter(user__is_active=True).select_related( + "user" + ) + ) + confirm = forms.BooleanField( + label="I reviewed the destination and its hosting plan policy" + ) + + +class MoveHostingView(OperatorAuthorization, FormView): + form_class = MoveHostingForm + template_name = "hosting/workspace_form.html" + extra_context = { + "title": "Move hosting to another manager", + "submit_label": "Move hosting account", + } + + def form_valid(self, form): + chosen = form.cleaned_data["manager"] + try: + with transaction.atomic(): + account = lock_hosting_account( + form.cleaned_data["account"].pk, customer_id=None + ) + require_open_account(account) + if account.reseller_id == chosen.pk: + raise ValidationError("Choose a different manager.") + managers = lock_resellers( + Reseller.objects.filter( + pk__in=[chosen.pk, account.reseller_id] + ) + ).select_related("user") + destination = next( + ( + manager + for manager in managers + if manager.pk == chosen.pk + ), + None, + ) + if destination is None or not destination.user.is_active: + raise ValidationError( + "The destination is no longer available." + ) + if ( + destination.hostingaccount_set.filter( + retired_at__isnull=True + ).count() + >= destination.account_limit + or not destination.hosting_plans.filter( + pk=account.hosting_plan_id + ).exists() + ): + raise ValidationError( + "The destination must have room and allow this plan." + ) + customer_id = account.customer_id + if customer_id is not None: + customer = Customer.objects.select_for_update().get( + pk=customer_id + ) + if ( + customer.hostingaccount_set.exclude(pk=account.pk) + .filter(retired_at__isnull=True) + .exists() + ): + raise ValidationError( + "This customer has other active hosting accounts. " + "Move them together when changing their manager." + ) + customer.reseller = destination + customer.save(update_fields=["reseller"]) + account.reseller = destination + save_operator_account( + account, + self.request.user.get_username(), + changed_fields=["reseller"], + ) + except ValidationError as error: + form.add_error(None, ValidationError(error.messages)) + return self.form_invalid(form) + return redirect(account) diff --git a/src/coulobre/hosting/account_backups.py b/src/coulobre/hosting/account_backups.py index c66e447..d6c4c70 100644 --- a/src/coulobre/hosting/account_backups.py +++ b/src/coulobre/hosting/account_backups.py @@ -41,8 +41,10 @@ def account_backup_manifest(account, *, include_mailboxes=False): @transaction.atomic -def queue_account_backup(account_id, *, include_mailboxes=False): - account = lock_hosting_account(account_id, customer_id=None) +def queue_account_backup( + account_id, *, include_mailboxes=False, customer_id=None +): + account = lock_hosting_account(account_id, customer_id=customer_id) require_open_account(account) _enqueue_backup(account, include_mailboxes=include_mailboxes) diff --git a/src/coulobre/hosting/customer_backup_views.py b/src/coulobre/hosting/customer_backup_views.py new file mode 100644 index 0000000..239717d --- /dev/null +++ b/src/coulobre/hosting/customer_backup_views.py @@ -0,0 +1,67 @@ +from django import forms +from django.contrib import messages +from django.contrib.auth.mixins import UserPassesTestMixin +from django.core.exceptions import ValidationError +from django.http import Http404 +from django.shortcuts import get_object_or_404, redirect +from django.utils.functional import cached_property +from django.views.generic import FormView + +from .access import customer_for_user +from .account_backups import mail_backups_enabled, queue_account_backup +from .installation_features import panel_feature_allowed +from .models import HostingAccount + + +class CustomerBackupForm(forms.Form): + include_mailboxes = forms.BooleanField( + required=False, label="Include mailboxes" + ) + + +class CustomerBackupView(UserPassesTestMixin, FormView): + template_name = "hosting/customer_backups.html" + form_class = CustomerBackupForm + + def test_func(self): + return customer_for_user(self.request.user) is not None + + @cached_property + def account(self): + return get_object_or_404( + HostingAccount, + pk=self.kwargs["pk"], + retired_at__isnull=True, + customer=customer_for_user(self.request.user), + ) + + def get_form(self, form_class=None): + form = super().get_form(form_class) + form.fields["include_mailboxes"].disabled = not mail_backups_enabled() + return form + + def get_context_data(self, **kwargs): + return super().get_context_data( + account=self.account, + backups=self.account.backup_jobs.order_by("-requested_at")[:30], + may_create=panel_feature_allowed("LOCAL_ACCOUNT_BACKUPS"), + **kwargs, + ) + + def form_valid(self, form): + if not panel_feature_allowed("LOCAL_ACCOUNT_BACKUPS"): + raise Http404 + customer = customer_for_user(self.request.user) + try: + queue_account_backup( + self.account.pk, + include_mailboxes=form.cleaned_data["include_mailboxes"], + customer_id=customer.pk, + ) + except HostingAccount.DoesNotExist as error: + raise Http404 from error + except ValidationError as error: + form.add_error(None, error) + return self.form_invalid(form) + messages.success(self.request, "Backup requested.") + return redirect("panel:customer_backups", pk=self.account.pk) diff --git a/src/coulobre/hosting/installation_views.py b/src/coulobre/hosting/installation_views.py index 9e73056..254b8ce 100644 --- a/src/coulobre/hosting/installation_views.py +++ b/src/coulobre/hosting/installation_views.py @@ -3,10 +3,7 @@ from importlib.metadata import PackageNotFoundError, version from django import forms from django.contrib import messages from django.contrib.admin.models import CHANGE, LogEntry -from django.contrib.auth.mixins import ( - PermissionRequiredMixin, - UserPassesTestMixin, -) +from django.contrib.auth.mixins import LoginRequiredMixin, UserPassesTestMixin from django.db import transaction from django.db.models import F from django.urls import reverse_lazy @@ -14,17 +11,14 @@ from django.utils.decorators import method_decorator from django.views.decorators.cache import never_cache from django.views.generic import FormView, TemplateView -from .access import OperatorOnlyMixin +from .access import is_tenant from .installation_features import FEATURES, FeaturePolicy from .models import PanelFeaturePolicy from .update_views import inspect_linked_nodes @method_decorator(never_cache, name="dispatch") -class InstallationView( - OperatorOnlyMixin, PermissionRequiredMixin, TemplateView -): - permission_required = "hosting.view_servicehealth" +class InstallationView(LoginRequiredMixin, TemplateView): template_name = "hosting/installation.html" def get_context_data(self, **kwargs): @@ -34,7 +28,10 @@ class InstallationView( installed_version = "Unavailable" policy = FeaturePolicy() features = [] - for feature in FEATURES: + may_view = not is_tenant( + self.request.user + ) and self.request.user.has_perm("hosting.view_servicehealth") + for feature in FEATURES if may_view else (): configured = feature.configured enabled = ( configured diff --git a/src/coulobre/hosting/invitations.py b/src/coulobre/hosting/invitations.py index 02c0499..ca35aa1 100644 --- a/src/coulobre/hosting/invitations.py +++ b/src/coulobre/hosting/invitations.py @@ -103,7 +103,7 @@ invitation_token = InvitationToken() @transaction.atomic -def queue_invitation(user): +def queue_invitation(user, *, welcome_message=None): user = lock_user(user.pk) if not may_accept_invitation(user): return None @@ -113,6 +113,11 @@ def queue_invitation(user): "revision": uuid.uuid4(), "created_at": timezone.now(), "delivery": PanelInvitation.Delivery.PENDING, + **( + {"welcome_message": welcome_message} + if welcome_message is not None + else {} + ), }, ) if not reset_enabled(): @@ -178,6 +183,7 @@ def deliver_invitation(invitation_id, revision): "hosting/panel_invitation.txt", { "username": user.get_username(), + "welcome_message": invitation.welcome_message, "setup_url": origin + path, "panel_url": origin + "/", "account": account, diff --git a/src/coulobre/hosting/migrations/0060_welcome_message.py b/src/coulobre/hosting/migrations/0060_welcome_message.py new file mode 100644 index 0000000..9722938 --- /dev/null +++ b/src/coulobre/hosting/migrations/0060_welcome_message.py @@ -0,0 +1,17 @@ +# Generated by Django 5.2.19 on 2026-11-23 21:06 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("hosting", "0059_panel_feature_policy"), + ] + + operations = [ + migrations.AddField( + model_name="panelinvitation", + name="welcome_message", + field=models.TextField(blank=True, default=""), + ), + ] diff --git a/src/coulobre/hosting/models.py b/src/coulobre/hosting/models.py index a2c0fc9..4f8e008 100644 --- a/src/coulobre/hosting/models.py +++ b/src/coulobre/hosting/models.py @@ -160,6 +160,8 @@ class Customer(models.Model): class PanelInvitation(models.Model): + welcome_message = models.TextField(blank=True, default="") + class Delivery(models.TextChoices): PENDING = "pending", "Waiting to send" SENT = "sent", "Sent" diff --git a/src/coulobre/hosting/panel_roles.py b/src/coulobre/hosting/panel_roles.py index 04aaff8..c2acc7e 100644 --- a/src/coulobre/hosting/panel_roles.py +++ b/src/coulobre/hosting/panel_roles.py @@ -23,7 +23,7 @@ SESSION_ROLE = "coulobre_panel_role" ROLE_LABELS = { PanelRole.ADMIN: "Server administrator", PanelRole.CUSTOMER: "Customer", - PanelRole.MANAGER: "Customer manager", + PanelRole.MANAGER: "Manager", } @@ -42,6 +42,20 @@ def assigned_roles(user): return roles +def ensure_operator_manager(user): + if not user.is_superuser or hasattr(user, "hosting_reseller"): + return + profile = ResellerProfile.objects.filter(default_slot=1).first() + defaults = {"account_limit": profile.account_limit} if profile else {} + with transaction.atomic(): + manager, created = Reseller.objects.get_or_create( + user=user, defaults=defaults + ) + if created and profile is not None: + manager.hosting_plans.set(profile.hosting_plans.all()) + user.hosting_reseller = manager + + def deny_permission(*args, **kwargs): return False @@ -84,7 +98,9 @@ class PanelRoleMiddleware: def __call__(self, request): response = self.get_response(request) - if getattr(request, "active_panel_role", None): + if getattr( + request, "active_panel_role", None + ) and "no-store" not in response.get("Cache-Control", ""): add_never_cache_headers(response) return response @@ -92,6 +108,7 @@ class PanelRoleMiddleware: if not request.user.is_authenticated: return None user = get_user(request) + ensure_operator_manager(user) roles = assigned_roles(user) selection = request.session.get(SESSION_ROLE) if selection is None: diff --git a/src/coulobre/hosting/reseller_views.py b/src/coulobre/hosting/reseller_views.py index 384f51a..7ee823f 100644 --- a/src/coulobre/hosting/reseller_views.py +++ b/src/coulobre/hosting/reseller_views.py @@ -163,8 +163,8 @@ class ResellerCreate( form_class = InviteLoginForm template_name = "hosting/reseller_form.html" extra_context = { - "page_title": "Add customer manager", - "submit_label": "Add customer manager", + "page_title": "Add manager", + "submit_label": "Add manager", } @cached_property @@ -220,7 +220,7 @@ class ResellerEdit( form_class = ResellerPolicyForm template_name = "hosting/reseller_form.html" extra_context = { - "page_title": "Edit customer manager", + "page_title": "Edit manager", "submit_label": "Save changes", } diff --git a/src/coulobre/hosting/static/hosting/panel.css b/src/coulobre/hosting/static/hosting/panel.css index f62287a..dfcf4f2 100644 --- a/src/coulobre/hosting/static/hosting/panel.css +++ b/src/coulobre/hosting/static/hosting/panel.css @@ -1179,3 +1179,29 @@ dd { padding-inline-end: max(var(--page-padding), 3.7rem); } } + +.workspace-context { + margin-bottom: var(--section-gap); +} + +.workspace-context select { + max-width: 100%; +} + +.workspace-list { + margin: 0; + padding: 1rem 1.2rem 1rem 2.3rem; +} + +.workspace-list li + li { + margin-top: 0.4rem; +} + +.sidebar-account .appearance-control { + display: block; + margin: 0.35rem 0; +} + +.sidebar-account .appearance-control[hidden] { + display: none; +} diff --git a/src/coulobre/hosting/templates/hosting/account_detail.html b/src/coulobre/hosting/templates/hosting/account_detail.html index a306962..270188c 100644 --- a/src/coulobre/hosting/templates/hosting/account_detail.html +++ b/src/coulobre/hosting/templates/hosting/account_detail.html @@ -17,7 +17,7 @@
| User | Workspace | Manager | Hosting accounts | Added |
|---|---|---|---|---|
| {{ login.get_username }} | {% if login.is_superuser %}Operator{% elif login.hosting_reseller %}Manager{% else %}Customer{% endif %} | {{ login.hosting_customer.reseller|default:"Unassigned" }} | {{ login.account_count }} | {{ login.date_joined|date:"j M Y" }} |
| No logins found. | ||||