1
0
Fork 0
mirror of https://gitlab.com/bramw/baserow.git synced 2025-04-03 04:35:31 +00:00

Move admin dashboard, user, and workspace to core

This commit is contained in:
Bram Wiepjes 2024-12-12 19:41:04 +00:00
parent db3c011f1b
commit ecceffa968
105 changed files with 1709 additions and 2081 deletions
backend
changelog/entries/unreleased/refactor
enterprise/backend/src/baserow_enterprise/api/audit_log
premium
backend
src/baserow_premium/api
admin/dashboard
urls.py
tests/baserow_premium_tests/admin/groups
web-frontend
web-frontend/modules/core

View file

@ -0,0 +1,9 @@
from django.urls import re_path
from baserow.api.admin.dashboard.views import AdminDashboardView
app_name = "baserow.api.admin.dashboard"
urlpatterns = [
re_path(r"^$", AdminDashboardView.as_view(), name="dashboard"),
]

View file

@ -2,15 +2,13 @@ from datetime import timedelta
from django.contrib.auth import get_user_model
from baserow_premium.admin.dashboard.handler import AdminDashboardHandler
from baserow_premium.license.features import PREMIUM
from baserow_premium.license.handler import LicenseHandler
from drf_spectacular.utils import extend_schema
from rest_framework.permissions import IsAdminUser
from rest_framework.response import Response
from rest_framework.views import APIView
from baserow.api.decorators import accept_timezone
from baserow.core.admin.dashboard.handler import AdminDashboardHandler
from baserow.core.models import Application, Workspace
from .serializers import AdminDashboardSerializer
@ -29,7 +27,7 @@ class AdminDashboardView(APIView):
"example `previous_new_users_last_24_hours` are the new users that signed up "
"from 48 to 24 hours ago. It can be used to calculate an increase or decrease "
"in the amount of signups. A list of the new and active users for every day "
"for the last 30 days is also included.\n\nThis is a **premium** feature.",
"for the last 30 days is also included.",
responses={
200: AdminDashboardSerializer,
401: None,
@ -46,10 +44,6 @@ class AdminDashboardView(APIView):
last 30 days is also included.
"""
LicenseHandler.raise_if_user_doesnt_have_feature_instance_wide(
PREMIUM, request.user
)
handler = AdminDashboardHandler()
total_users = User.objects.filter(is_active=True).count()
total_workspaces = Workspace.objects.filter(template__isnull=True).count()

View file

@ -4,7 +4,7 @@ from .dashboard import urls as dashboard_urls
from .users import urls as users_urls
from .workspaces import urls as workspaces_urls
app_name = "baserow_premium.api.admin"
app_name = "baserow.api.admin"
urlpatterns = [
path("dashboard/", include(dashboard_urls, namespace="dashboard")),

View file

@ -1,12 +1,12 @@
from django.urls import re_path
from baserow_premium.api.admin.users.views import (
from baserow.api.admin.users.views import (
UserAdminImpersonateView,
UserAdminView,
UsersAdminView,
)
app_name = "baserow_premium.api.admin.users"
app_name = "baserow.api.admin.users"
urlpatterns = [
re_path(r"^$", UsersAdminView.as_view(), name="list"),

View file

@ -1,26 +1,6 @@
from django.contrib.auth import get_user_model
from django.db import transaction
from baserow_premium.admin.users.exceptions import (
CannotDeactivateYourselfException,
CannotDeleteYourselfException,
UserDoesNotExistException,
)
from baserow_premium.admin.users.handler import UserAdminHandler
from baserow_premium.api.admin.users.errors import (
USER_ADMIN_ALREADY_EXISTS,
USER_ADMIN_CANNOT_DEACTIVATE_SELF,
USER_ADMIN_CANNOT_DELETE_SELF,
USER_ADMIN_UNKNOWN_USER,
)
from baserow_premium.api.admin.users.serializers import (
UserAdminCreateSerializer,
UserAdminResponseSerializer,
UserAdminUpdateSerializer,
)
from baserow_premium.api.admin.views import AdminListingView
from baserow_premium.license.features import PREMIUM
from baserow_premium.license.handler import LicenseHandler
from drf_spectacular.types import OpenApiTypes
from drf_spectacular.utils import OpenApiParameter, extend_schema
from loguru import logger
@ -30,10 +10,28 @@ from rest_framework.response import Response
from rest_framework.status import HTTP_200_OK
from rest_framework.views import APIView
from baserow.api.admin.users.errors import (
USER_ADMIN_ALREADY_EXISTS,
USER_ADMIN_CANNOT_DEACTIVATE_SELF,
USER_ADMIN_CANNOT_DELETE_SELF,
USER_ADMIN_UNKNOWN_USER,
)
from baserow.api.admin.users.serializers import (
UserAdminCreateSerializer,
UserAdminResponseSerializer,
UserAdminUpdateSerializer,
)
from baserow.api.admin.views import AdminListingView
from baserow.api.decorators import map_exceptions, validate_body
from baserow.api.schemas import get_error_schema
from baserow.api.user.schemas import authenticate_user_schema
from baserow.api.user.serializers import get_all_user_data_serialized
from baserow.core.admin.users.exceptions import (
CannotDeactivateYourselfException,
CannotDeleteYourselfException,
UserDoesNotExistException,
)
from baserow.core.admin.users.handler import UserAdminHandler
from baserow.core.user.exceptions import DeactivatedUserException, UserAlreadyExist
from baserow.core.user.utils import generate_session_tokens_for_user
@ -63,15 +61,12 @@ class UsersAdminView(AdminListingView):
tags=["Admin"],
operation_id="admin_list_users",
description="Returns all users with detailed information on each user, "
"if the requesting user is staff. \n\nThis is a **premium** feature.",
"if the requesting user is staff.",
**AdminListingView.get_extend_schema_parameters(
"users", serializer_class, search_fields, sort_field_mapping
),
)
def get(self, request):
LicenseHandler.raise_if_user_doesnt_have_feature_instance_wide(
PREMIUM, request.user
)
return super().get(request)
@extend_schema(
@ -80,7 +75,7 @@ class UsersAdminView(AdminListingView):
operation_id="admin_create_user",
description=(
"Creates and returns a new user if the requesting user is staff. This "
"works even if new signups are disabled. \n\nThis is a **premium** feature."
"works even if new signups are disabled."
),
responses={
200: UserAdminResponseSerializer(),
@ -119,7 +114,7 @@ class UserAdminView(APIView):
operation_id="admin_edit_user",
description=f"Updates specified user attributes and returns the updated user if"
f" the requesting user is staff. You cannot update yourself to no longer be an "
f"admin or active. \n\nThis is a **premium** feature.",
f"admin or active.",
parameters=[
OpenApiParameter(
name="user_id",
@ -168,7 +163,7 @@ class UserAdminView(APIView):
tags=["Admin"],
operation_id="admin_delete_user",
description="Deletes the specified user, if the requesting user has admin "
"permissions. You cannot delete yourself. \n\nThis is a **premium** feature.",
"permissions. You cannot delete yourself.",
parameters=[
OpenApiParameter(
name="user_id",
@ -231,7 +226,6 @@ class UserAdminImpersonateView(GenericAPIView):
"This endpoint allows staff to impersonate another user by requesting a "
"JWT token and user object. The requesting user must have staff access in "
"order to do this. It's not possible to impersonate a superuser or staff."
"\n\nThis is a **premium** feature."
),
request=BaserowImpersonateAuthTokenSerializer,
responses={
@ -245,10 +239,6 @@ class UserAdminImpersonateView(GenericAPIView):
}
)
def post(self, request):
LicenseHandler.raise_if_user_doesnt_have_feature_instance_wide(
PREMIUM, request.user
)
serializer = self.get_serializer(data=request.data)
serializer.is_valid(raise_exception=True)

View file

@ -1,11 +1,8 @@
from django.urls import re_path
from baserow_premium.api.admin.workspaces.views import (
WorkspaceAdminView,
WorkspacesAdminView,
)
from baserow.api.admin.workspaces.views import WorkspaceAdminView, WorkspacesAdminView
app_name = "baserow_premium.api.admin.workspaces"
app_name = "baserow.api.admin.workspaces"
urlpatterns = [
re_path(r"^$", WorkspacesAdminView.as_view(), name="list"),

View file

@ -1,20 +1,18 @@
from django.db import transaction
from django.db.models import Count
from baserow_premium.admin.workspaces.exceptions import CannotDeleteATemplateGroupError
from baserow_premium.admin.workspaces.handler import WorkspacesAdminHandler
from baserow_premium.api.admin.views import AdminListingView
from baserow_premium.license.features import PREMIUM
from baserow_premium.license.handler import LicenseHandler
from drf_spectacular.types import OpenApiTypes
from drf_spectacular.utils import OpenApiParameter, extend_schema
from rest_framework.permissions import IsAdminUser
from rest_framework.response import Response
from rest_framework.views import APIView
from baserow.api.admin.views import AdminListingView
from baserow.api.decorators import map_exceptions
from baserow.api.errors import ERROR_GROUP_DOES_NOT_EXIST
from baserow.api.schemas import get_error_schema
from baserow.core.admin.workspaces.exceptions import CannotDeleteATemplateGroupError
from baserow.core.admin.workspaces.handler import WorkspacesAdminHandler
from baserow.core.exceptions import WorkspaceDoesNotExist
from baserow.core.handler import CoreHandler
from baserow.core.models import Workspace
@ -55,15 +53,12 @@ class WorkspacesAdminView(AdminListingView):
tags=["Admin"],
operation_id="admin_list_workspaces",
description="Returns all workspaces with detailed information on each workspace, "
"if the requesting user is staff.\n\nThis is a **premium** feature.",
"if the requesting user is staff.",
**AdminListingView.get_extend_schema_parameters(
"workspaces", serializer_class, search_fields, sort_field_mapping
),
)
def get(self, request):
LicenseHandler.raise_if_user_doesnt_have_feature_instance_wide(
PREMIUM, request.user
)
return super().get(request)
@ -74,7 +69,7 @@ class WorkspaceAdminView(APIView):
tags=["Admin"],
operation_id="admin_delete_workspace",
description="Deletes the specified workspace and the applications inside that "
"workspace, if the requesting user is staff. \n\nThis is a **premium** feature.",
"workspace, if the requesting user is staff.",
parameters=[
OpenApiParameter(
name="workspace_id",

View file

@ -8,6 +8,7 @@ from baserow.core.registries import (
plugin_registry,
)
from .admin import urls as admin_urls
from .applications import urls as application_urls
from .auth_provider import urls as auth_provider_urls
from .health import urls as health_urls
@ -47,6 +48,7 @@ urlpatterns = (
path("snapshots/", include(snapshots_urls, namespace="snapshots")),
path("_health/", include(health_urls, namespace="health")),
path("notifications/", include(notifications_urls, namespace="notifications")),
path("admin/", include(admin_urls, namespace="admin")),
path(
"",
include(integrations_urls, namespace="integrations"),

View file

@ -5,14 +5,11 @@ from django.contrib.auth.password_validation import validate_password
from django.core.exceptions import ValidationError
from django.db.models import Q
from baserow_premium.admin.users.exceptions import (
from baserow.core.admin.users.exceptions import (
CannotDeactivateYourselfException,
CannotDeleteYourselfException,
UserDoesNotExistException,
)
from baserow_premium.license.features import PREMIUM
from baserow_premium.license.handler import LicenseHandler
from baserow.core.exceptions import IsNotAdminError
from baserow.core.signals import before_user_deleted
from baserow.core.user.exceptions import (
@ -48,9 +45,6 @@ class UserAdminHandler:
:param is_active: Value to disable or enable login for the user.
"""
LicenseHandler.raise_if_user_doesnt_have_feature_instance_wide(
PREMIUM, requesting_user
)
self._raise_if_not_permitted(requesting_user)
user = UserHandler().force_create_user(
@ -92,9 +86,6 @@ class UserAdminHandler:
:raises UserAlreadyExist: If a user with that username already exists.
"""
LicenseHandler.raise_if_user_doesnt_have_feature_instance_wide(
PREMIUM, requesting_user
)
self._raise_if_not_permitted(requesting_user)
self._raise_if_locking_self_out_of_admin(
is_active, is_staff, requesting_user, user_id
@ -161,9 +152,6 @@ class UserAdminHandler:
UnknownUserException.
"""
LicenseHandler.raise_if_user_doesnt_have_feature_instance_wide(
PREMIUM, requesting_user
)
self._raise_if_not_permitted(requesting_user)
if requesting_user.id == user_id:

View file

@ -1,7 +1,4 @@
from baserow_premium.admin.workspaces.exceptions import CannotDeleteATemplateGroupError
from baserow_premium.license.features import PREMIUM
from baserow_premium.license.handler import LicenseHandler
from baserow.core.admin.workspaces.exceptions import CannotDeleteATemplateGroupError
from baserow.core.exceptions import IsNotAdminError
from baserow.core.signals import workspace_deleted
from baserow.core.trash.handler import TrashHandler
@ -19,8 +16,6 @@ class WorkspacesAdminHandler:
:raises IsNotAdminError: If the user is not admin or staff.
"""
LicenseHandler.raise_if_user_doesnt_have_feature_instance_wide(PREMIUM, user)
if not user.is_staff:
raise IsNotAdminError()

View file

@ -3,42 +3,34 @@ from django.test.utils import override_settings
import pytest
from freezegun import freeze_time
from rest_framework.status import (
HTTP_200_OK,
HTTP_402_PAYMENT_REQUIRED,
HTTP_403_FORBIDDEN,
)
from rest_framework.status import HTTP_200_OK, HTTP_403_FORBIDDEN
from baserow.core.models import UserLogEntry
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_admin_dashboard(api_client, premium_data_fixture):
def test_admin_dashboard(api_client, data_fixture):
with freeze_time("2020-01-01 00:01"):
normal_user = premium_data_fixture.create_user(
is_staff=False, has_active_premium_license=True
)
admin_user = premium_data_fixture.create_user(
is_staff=True, has_active_premium_license=True
)
normal_user = data_fixture.create_user(is_staff=False)
admin_user = data_fixture.create_user(is_staff=True)
with freeze_time("2020-01-01 00:01"):
normal_token = premium_data_fixture.generate_token(user=normal_user)
admin_token = premium_data_fixture.generate_token(user=admin_user)
normal_token = data_fixture.generate_token(user=normal_user)
admin_token = data_fixture.generate_token(user=admin_user)
premium_data_fixture.create_database_application(user=normal_user)
data_fixture.create_database_application(user=normal_user)
UserLogEntry.objects.create(actor=admin_user, action="SIGNED_IN")
response = api_client.get(
reverse("api:premium:admin:dashboard:dashboard"),
reverse("api:admin:dashboard:dashboard"),
format="json",
HTTP_AUTHORIZATION=f"JWT {normal_token}",
)
assert response.status_code == HTTP_403_FORBIDDEN
response = api_client.get(
reverse("api:premium:admin:dashboard:dashboard"),
reverse("api:admin:dashboard:dashboard"),
format="json",
HTTP_AUTHORIZATION=f"JWT {admin_token}",
)
@ -63,7 +55,7 @@ def test_admin_dashboard(api_client, premium_data_fixture):
"active_users_per_day": [{"date": "2020-01-01", "count": 1}],
}
url = reverse("api:premium:admin:dashboard:dashboard")
url = reverse("api:admin:dashboard:dashboard")
response = api_client.get(
f"{url}?timezone=Etc/GMT%2B1",
format="json",
@ -89,13 +81,3 @@ def test_admin_dashboard(api_client, premium_data_fixture):
"new_users_per_day": [{"date": "2019-12-31", "count": 2}],
"active_users_per_day": [{"date": "2019-12-31", "count": 1}],
}
premium_data_fixture.remove_all_active_premium_licenses(admin_user)
url = reverse("api:premium:admin:dashboard:dashboard")
response = api_client.get(
url,
format="json",
HTTP_AUTHORIZATION=f"JWT {admin_token}",
)
assert response.status_code == HTTP_402_PAYMENT_REQUIRED
assert response.json()["error"] == "ERROR_FEATURE_NOT_AVAILABLE"

View file

@ -7,7 +7,6 @@ import pytest
from rest_framework.status import (
HTTP_200_OK,
HTTP_400_BAD_REQUEST,
HTTP_402_PAYMENT_REQUIRED,
HTTP_403_FORBIDDEN,
HTTP_404_NOT_FOUND,
)
@ -17,9 +16,7 @@ from baserow.core.models import Workspace
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_list_admin_workspaces(
api_client, premium_data_fixture, django_assert_num_queries
):
def test_list_admin_workspaces(api_client, data_fixture, django_assert_num_queries):
"""
This endpoint doesn't need to be tested extensively because it uses the same base
class as the list users endpoint which already has extensive tests. We only need to
@ -27,41 +24,37 @@ def test_list_admin_workspaces(
"""
created = datetime(2020, 4, 10, 0, 0, 0).replace(tzinfo=timezone.utc)
staff_user, staff_token = premium_data_fixture.create_user_and_token(
is_staff=True, has_active_premium_license=True
)
normal_user, normal_token = premium_data_fixture.create_user_and_token(
has_active_premium_license=True
)
workspace_1 = premium_data_fixture.create_workspace(name="A")
staff_user, staff_token = data_fixture.create_user_and_token(is_staff=True)
normal_user, normal_token = data_fixture.create_user_and_token()
workspace_1 = data_fixture.create_workspace(name="A")
workspace_1.created_on = created
workspace_1.save()
workspace_2 = premium_data_fixture.create_workspace(name="B", created_on=created)
workspace_2 = data_fixture.create_workspace(name="B", created_on=created)
workspace_2.created_on = created
workspace_2.save()
template_workspace = premium_data_fixture.create_workspace(
template_workspace = data_fixture.create_workspace(
name="Template", created_on=created
)
premium_data_fixture.create_template(workspace=template_workspace)
premium_data_fixture.create_user_workspace(
data_fixture.create_template(workspace=template_workspace)
data_fixture.create_user_workspace(
workspace=workspace_1, user=normal_user, permissions="MEMBER"
)
premium_data_fixture.create_user_workspace(
data_fixture.create_user_workspace(
workspace=workspace_2, user=normal_user, permissions="ADMIN"
)
premium_data_fixture.create_database_application(workspace=workspace_1)
premium_data_fixture.create_database_application(workspace=workspace_1)
data_fixture.create_database_application(workspace=workspace_1)
data_fixture.create_database_application(workspace=workspace_1)
response = api_client.get(
reverse("api:premium:admin:workspaces:list"),
reverse("api:admin:workspaces:list"),
format="json",
HTTP_AUTHORIZATION=f"JWT {normal_token}",
)
assert response.status_code == HTTP_403_FORBIDDEN
with django_assert_num_queries(6):
with django_assert_num_queries(5):
response = api_client.get(
reverse("api:premium:admin:workspaces:list"),
reverse("api:admin:workspaces:list"),
format="json",
HTTP_AUTHORIZATION=f"JWT {staff_token}",
)
@ -111,7 +104,7 @@ def test_list_admin_workspaces(
}
response = api_client.get(
f'{reverse("api:premium:admin:workspaces:list")}?search={workspace_1.name}',
f'{reverse("api:admin:workspaces:list")}?search={workspace_1.name}',
format="json",
HTTP_AUTHORIZATION=f"JWT {staff_token}",
)
@ -143,7 +136,7 @@ def test_list_admin_workspaces(
}
response = api_client.get(
f'{reverse("api:premium:admin:workspaces:list")}?sorts=-name',
f'{reverse("api:admin:workspaces:list")}?sorts=-name',
format="json",
HTTP_AUTHORIZATION=f"JWT {staff_token}",
)
@ -191,67 +184,37 @@ def test_list_admin_workspaces(
],
}
premium_data_fixture.remove_all_active_premium_licenses(staff_user)
response = api_client.get(
f'{reverse("api:premium:admin:workspaces:list")}',
format="json",
HTTP_AUTHORIZATION=f"JWT {staff_token}",
)
assert response.status_code == HTTP_402_PAYMENT_REQUIRED
assert response.json()["error"] == "ERROR_FEATURE_NOT_AVAILABLE"
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_delete_workspace(api_client, premium_data_fixture):
normal_user, normal_token = premium_data_fixture.create_user_and_token(
has_active_premium_license=True
)
staff_user, staff_token = premium_data_fixture.create_user_and_token(
is_staff=True, has_active_premium_license=True
)
workspace = premium_data_fixture.create_workspace()
def test_delete_workspace(api_client, data_fixture):
normal_user, normal_token = data_fixture.create_user_and_token()
staff_user, staff_token = data_fixture.create_user_and_token(is_staff=True)
workspace = data_fixture.create_workspace()
url = reverse("api:premium:admin:workspaces:edit", kwargs={"workspace_id": 99999})
url = reverse("api:admin:workspaces:edit", kwargs={"workspace_id": 99999})
response = api_client.delete(url, HTTP_AUTHORIZATION=f"JWT {staff_token}")
assert response.status_code == HTTP_404_NOT_FOUND
assert response.json()["error"] == "ERROR_GROUP_DOES_NOT_EXIST"
url = reverse(
"api:premium:admin:workspaces:edit", kwargs={"workspace_id": workspace.id}
)
url = reverse("api:admin:workspaces:edit", kwargs={"workspace_id": workspace.id})
response = api_client.delete(url, HTTP_AUTHORIZATION=f"JWT {normal_token}")
assert response.status_code == HTTP_403_FORBIDDEN
url = reverse(
"api:premium:admin:workspaces:edit", kwargs={"workspace_id": workspace.id}
)
url = reverse("api:admin:workspaces:edit", kwargs={"workspace_id": workspace.id})
response = api_client.delete(url, HTTP_AUTHORIZATION=f"JWT {staff_token}")
assert response.status_code == 204
assert Workspace.objects.all().count() == 0
premium_data_fixture.remove_all_active_premium_licenses(staff_user)
workspace = premium_data_fixture.create_workspace()
url = reverse(
"api:premium:admin:workspaces:edit", kwargs={"workspace_id": workspace.id}
)
response = api_client.delete(url, HTTP_AUTHORIZATION=f"JWT {staff_token}")
assert response.status_code == HTTP_402_PAYMENT_REQUIRED
assert response.json()["error"] == "ERROR_FEATURE_NOT_AVAILABLE"
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_cant_delete_template_workspace(api_client, premium_data_fixture):
staff_user, staff_token = premium_data_fixture.create_user_and_token(
is_staff=True, has_active_premium_license=True
)
workspace = premium_data_fixture.create_workspace()
premium_data_fixture.create_template(workspace=workspace)
def test_cant_delete_template_workspace(api_client, data_fixture):
staff_user, staff_token = data_fixture.create_user_and_token(is_staff=True)
workspace = data_fixture.create_workspace()
data_fixture.create_template(workspace=workspace)
url = reverse(
"api:premium:admin:workspaces:edit", kwargs={"workspace_id": workspace.id}
)
url = reverse("api:admin:workspaces:edit", kwargs={"workspace_id": workspace.id})
response = api_client.delete(url, HTTP_AUTHORIZATION=f"JWT {staff_token}")
assert response.status_code == HTTP_400_BAD_REQUEST
assert response.json()["error"] == "ERROR_CANNOT_DELETE_A_TEMPLATE_GROUP"

View file

@ -13,7 +13,6 @@ from rest_framework.status import (
HTTP_204_NO_CONTENT,
HTTP_400_BAD_REQUEST,
HTTP_401_UNAUTHORIZED,
HTTP_402_PAYMENT_REQUIRED,
HTTP_403_FORBIDDEN,
)
@ -36,16 +35,15 @@ invalid_passwords = [
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_non_admin_cannot_see_admin_users_endpoint(api_client, premium_data_fixture):
non_staff_user, token = premium_data_fixture.create_user_and_token(
def test_non_admin_cannot_see_admin_users_endpoint(api_client, data_fixture):
non_staff_user, token = data_fixture.create_user_and_token(
email="test@test.nl",
password="password",
first_name="Test1",
is_staff=False,
has_active_premium_license=True,
)
response = api_client.get(
reverse("api:premium:admin:users:list"),
reverse("api:admin:users:list"),
format="json",
HTTP_AUTHORIZATION=f"JWT {token}",
)
@ -54,29 +52,28 @@ def test_non_admin_cannot_see_admin_users_endpoint(api_client, premium_data_fixt
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_admin_can_see_admin_users_endpoint(api_client, premium_data_fixture):
staff_user, token = premium_data_fixture.create_user_and_token(
def test_admin_can_see_admin_users_endpoint(api_client, data_fixture):
staff_user, token = data_fixture.create_user_and_token(
email="test@test.nl",
password="password",
first_name="Test1",
is_staff=True,
date_joined=datetime(2021, 4, 1, 1, 0, 0, 0, tzinfo=timezone.utc),
has_active_premium_license=True,
)
workspace_user_is_admin_of = premium_data_fixture.create_workspace()
premium_data_fixture.create_user_workspace(
workspace_user_is_admin_of = data_fixture.create_workspace()
data_fixture.create_user_workspace(
workspace=workspace_user_is_admin_of,
user=staff_user,
permissions=WORKSPACE_USER_PERMISSION_ADMIN,
)
workspace_user_is_not_admin_of = premium_data_fixture.create_workspace()
premium_data_fixture.create_user_workspace(
workspace_user_is_not_admin_of = data_fixture.create_workspace()
data_fixture.create_user_workspace(
workspace=workspace_user_is_not_admin_of,
user=staff_user,
permissions=WORKSPACE_USER_PERMISSION_MEMBER,
)
response = api_client.get(
reverse("api:premium:admin:users:list"),
reverse("api:admin:users:list"),
format="json",
HTTP_AUTHORIZATION=f"JWT {token}",
)
@ -115,37 +112,15 @@ def test_admin_can_see_admin_users_endpoint(api_client, premium_data_fixture):
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_admin_list_users_without_premium_license(api_client, premium_data_fixture):
staff_user, token = premium_data_fixture.create_user_and_token(
def test_admin_with_invalid_token_cannot_see_admin_users(api_client, data_fixture):
data_fixture.create_user_and_token(
email="test@test.nl",
password="password",
first_name="Test1",
is_staff=True,
date_joined=datetime(2021, 4, 1, 1, 0, 0, 0, tzinfo=timezone.utc),
)
response = api_client.get(
reverse("api:premium:admin:users:list"),
format="json",
HTTP_AUTHORIZATION=f"JWT {token}",
)
assert response.status_code == HTTP_402_PAYMENT_REQUIRED
assert response.json()["error"] == "ERROR_FEATURE_NOT_AVAILABLE"
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_admin_with_invalid_token_cannot_see_admin_users(
api_client, premium_data_fixture
):
premium_data_fixture.create_user_and_token(
email="test@test.nl",
password="password",
first_name="Test1",
is_staff=True,
has_active_premium_license=True,
)
response = api_client.get(
reverse("api:premium:admin:users:list"),
reverse("api:admin:users:list"),
format="json",
HTTP_AUTHORIZATION=f"JWT abc123",
)
@ -156,16 +131,15 @@ def test_admin_with_invalid_token_cannot_see_admin_users(
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_admin_accessing_invalid_user_admin_page_returns_error(
api_client, premium_data_fixture
api_client, data_fixture
):
_, token = premium_data_fixture.create_user_and_token(
_, token = data_fixture.create_user_and_token(
email="test@test.nl",
password="password",
first_name="Test1",
is_staff=True,
has_active_premium_license=True,
)
url = reverse("api:premium:admin:users:list")
url = reverse("api:admin:users:list")
response = api_client.get(
f"{url}?page=2",
format="json",
@ -178,16 +152,15 @@ def test_admin_accessing_invalid_user_admin_page_returns_error(
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_admin_accessing_user_admin_with_invalid_page_size_returns_error(
api_client, premium_data_fixture
api_client, data_fixture
):
_, token = premium_data_fixture.create_user_and_token(
_, token = data_fixture.create_user_and_token(
email="test@test.nl",
password="password",
first_name="Test1",
is_staff=True,
has_active_premium_license=True,
)
url = reverse("api:premium:admin:users:list")
url = reverse("api:admin:users:list")
response = api_client.get(
f"{url}?page=1&size=201",
format="json",
@ -199,22 +172,20 @@ def test_admin_accessing_user_admin_with_invalid_page_size_returns_error(
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_admin_can_search_users(api_client, premium_data_fixture):
_, token = premium_data_fixture.create_user_and_token(
def test_admin_can_search_users(api_client, data_fixture):
_, token = data_fixture.create_user_and_token(
email="test@test.nl",
password="password",
first_name="Test1",
is_staff=True,
has_active_premium_license=True,
)
searched_for_user = premium_data_fixture.create_user(
searched_for_user = data_fixture.create_user(
email="specific_user@test.nl",
password="password",
first_name="Test1",
date_joined=datetime(2021, 4, 1, 1, 0, 0, 0, tzinfo=timezone.utc),
has_active_premium_license=True,
)
url = reverse("api:premium:admin:users:list")
url = reverse("api:admin:users:list")
response = api_client.get(
f"{url}?page=1&search=specific_user",
format="json",
@ -242,22 +213,20 @@ def test_admin_can_search_users(api_client, premium_data_fixture):
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_admin_can_sort_users(api_client, premium_data_fixture):
_, token = premium_data_fixture.create_user_and_token(
def test_admin_can_sort_users(api_client, data_fixture):
_, token = data_fixture.create_user_and_token(
email="test@test.nl",
password="password",
first_name="Test1",
is_staff=True,
has_active_premium_license=True,
)
searched_for_user = premium_data_fixture.create_user(
searched_for_user = data_fixture.create_user(
email="specific_user@test.nl",
password="password",
first_name="Test1",
date_joined=datetime(2021, 4, 1, 1, 0, 0, 0, tzinfo=timezone.utc),
has_active_premium_license=True,
)
url = reverse("api:premium:admin:users:list")
url = reverse("api:admin:users:list")
response = api_client.get(
f"{url}?page=1&search=specific_user",
format="json",
@ -286,16 +255,15 @@ def test_admin_can_sort_users(api_client, premium_data_fixture):
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_returns_error_response_if_invalid_sort_field_provided(
api_client, premium_data_fixture
api_client, data_fixture
):
_, token = premium_data_fixture.create_user_and_token(
_, token = data_fixture.create_user_and_token(
email="test@test.nl",
password="password",
first_name="Test1",
is_staff=True,
has_active_premium_license=True,
)
url = reverse("api:premium:admin:users:list")
url = reverse("api:admin:users:list")
response = api_client.get(
f"{url}?page=1&sorts=-invalid_field_name",
format="json",
@ -308,16 +276,15 @@ def test_returns_error_response_if_invalid_sort_field_provided(
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_returns_error_response_if_sort_direction_not_provided(
api_client, premium_data_fixture
api_client, data_fixture
):
_, token = premium_data_fixture.create_user_and_token(
_, token = data_fixture.create_user_and_token(
email="test@test.nl",
password="password",
first_name="Test1",
is_staff=True,
has_active_premium_license=True,
)
url = reverse("api:premium:admin:users:list")
url = reverse("api:admin:users:list")
response = api_client.get(
f"{url}?page=1&sorts=username",
format="json",
@ -330,16 +297,15 @@ def test_returns_error_response_if_sort_direction_not_provided(
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_returns_error_response_if_invalid_sort_direction_provided(
api_client, premium_data_fixture
api_client, data_fixture
):
_, token = premium_data_fixture.create_user_and_token(
_, token = data_fixture.create_user_and_token(
email="test@test.nl",
password="password",
first_name="Test1",
is_staff=True,
has_active_premium_license=True,
)
url = reverse("api:premium:admin:users:list")
url = reverse("api:admin:users:list")
response = api_client.get(
f"{url}?page=1&sorts=*username",
format="json",
@ -352,16 +318,15 @@ def test_returns_error_response_if_invalid_sort_direction_provided(
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_returns_error_response_if_invalid_sorts_mixed_with_valid_ones(
api_client, premium_data_fixture
api_client, data_fixture
):
_, token = premium_data_fixture.create_user_and_token(
_, token = data_fixture.create_user_and_token(
email="test@test.nl",
password="password",
first_name="Test1",
is_staff=True,
has_active_premium_license=True,
)
url = reverse("api:premium:admin:users:list")
url = reverse("api:admin:users:list")
response = api_client.get(
f"{url}?page=1&sorts=+username,username,-invalid_field",
format="json",
@ -373,17 +338,14 @@ def test_returns_error_response_if_invalid_sorts_mixed_with_valid_ones(
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_returns_error_response_if_blank_sorts_provided(
api_client, premium_data_fixture
):
_, token = premium_data_fixture.create_user_and_token(
def test_returns_error_response_if_blank_sorts_provided(api_client, data_fixture):
_, token = data_fixture.create_user_and_token(
email="test@test.nl",
password="password",
first_name="Test1",
is_staff=True,
has_active_premium_license=True,
)
url = reverse("api:premium:admin:users:list")
url = reverse("api:admin:users:list")
response = api_client.get(
f"{url}?page=1&sorts=,,",
format="json",
@ -395,15 +357,14 @@ def test_returns_error_response_if_blank_sorts_provided(
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_returns_error_response_if_no_sorts_provided(api_client, premium_data_fixture):
_, token = premium_data_fixture.create_user_and_token(
def test_returns_error_response_if_no_sorts_provided(api_client, data_fixture):
_, token = data_fixture.create_user_and_token(
email="test@test.nl",
password="password",
first_name="Test1",
is_staff=True,
has_active_premium_license=True,
)
url = reverse("api:premium:admin:users:list")
url = reverse("api:admin:users:list")
response = api_client.get(
f"{url}?page=1&sorts=",
format="json",
@ -415,21 +376,19 @@ def test_returns_error_response_if_no_sorts_provided(api_client, premium_data_fi
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_non_admin_cannot_delete_user(api_client, premium_data_fixture):
_, non_admin_token = premium_data_fixture.create_user_and_token(
def test_non_admin_cannot_delete_user(api_client, data_fixture):
_, non_admin_token = data_fixture.create_user_and_token(
email="test@test.nl",
password="password",
first_name="Test1",
is_staff=False,
has_active_premium_license=True,
)
user_to_delete = premium_data_fixture.create_user(
user_to_delete = data_fixture.create_user(
email="specific_user@test.nl",
password="password",
first_name="Test1",
has_active_premium_license=True,
)
url = reverse("api:premium:admin:users:edit", kwargs={"user_id": user_to_delete.id})
url = reverse("api:admin:users:edit", kwargs={"user_id": user_to_delete.id})
response = api_client.delete(
url,
format="json",
@ -440,47 +399,19 @@ def test_non_admin_cannot_delete_user(api_client, premium_data_fixture):
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_admin_cannot_delete_user_without_premium_license(
api_client, premium_data_fixture
):
_, admin_token = premium_data_fixture.create_user_and_token(
def test_admin_can_delete_user(api_client, data_fixture):
_, token = data_fixture.create_user_and_token(
email="test@test.nl",
password="password",
first_name="Test1",
is_staff=True,
)
user_to_delete = premium_data_fixture.create_user(
user_to_delete = data_fixture.create_user(
email="specific_user@test.nl",
password="password",
first_name="Test1",
)
url = reverse("api:premium:admin:users:edit", kwargs={"user_id": user_to_delete.id})
response = api_client.delete(
url,
format="json",
HTTP_AUTHORIZATION=f"JWT {admin_token}",
)
assert response.status_code == HTTP_402_PAYMENT_REQUIRED
assert response.json()["error"] == "ERROR_FEATURE_NOT_AVAILABLE"
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_admin_can_delete_user(api_client, premium_data_fixture):
_, token = premium_data_fixture.create_user_and_token(
email="test@test.nl",
password="password",
first_name="Test1",
is_staff=True,
has_active_premium_license=True,
)
user_to_delete = premium_data_fixture.create_user(
email="specific_user@test.nl",
password="password",
first_name="Test1",
has_active_premium_license=True,
)
url = reverse("api:premium:admin:users:edit", kwargs={"user_id": user_to_delete.id})
url = reverse("api:admin:users:edit", kwargs={"user_id": user_to_delete.id})
response = api_client.delete(
url,
format="json",
@ -489,7 +420,7 @@ def test_admin_can_delete_user(api_client, premium_data_fixture):
assert response.status_code == HTTP_204_NO_CONTENT
response = api_client.get(
reverse("api:premium:admin:users:list"),
reverse("api:admin:users:list"),
format="json",
HTTP_AUTHORIZATION=f"JWT {token}",
)
@ -499,15 +430,14 @@ def test_admin_can_delete_user(api_client, premium_data_fixture):
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_non_admin_cannot_patch_user(api_client, premium_data_fixture):
non_admin_user, non_admin_user_token = premium_data_fixture.create_user_and_token(
def test_non_admin_cannot_patch_user(api_client, data_fixture):
non_admin_user, non_admin_user_token = data_fixture.create_user_and_token(
email="test@test.nl",
password="password",
first_name="Test1",
is_staff=False,
has_active_premium_license=True,
)
url = reverse("api:premium:admin:users:edit", kwargs={"user_id": non_admin_user.id})
url = reverse("api:admin:users:edit", kwargs={"user_id": non_admin_user.id})
response = api_client.patch(
url,
{"username": "some_other_email@test.nl"},
@ -522,41 +452,15 @@ def test_non_admin_cannot_patch_user(api_client, premium_data_fixture):
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_non_admin_cannot_patch_user_without_premium_license(
api_client, premium_data_fixture
):
non_admin_user, non_admin_user_token = premium_data_fixture.create_user_and_token(
email="test@test.nl",
password="password",
first_name="Test1",
is_staff=True,
)
url = reverse("api:premium:admin:users:edit", kwargs={"user_id": non_admin_user.id})
response = api_client.patch(
url,
{"username": "some_other_email@test.nl"},
format="json",
HTTP_AUTHORIZATION=f"JWT {non_admin_user_token}",
)
assert response.status_code == HTTP_402_PAYMENT_REQUIRED
assert response.json()["error"] == "ERROR_FEATURE_NOT_AVAILABLE"
non_admin_user.refresh_from_db()
assert non_admin_user.email == "test@test.nl"
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_admin_cannot_create_user_without_body(api_client, premium_data_fixture):
user, token = premium_data_fixture.create_user_and_token(
def test_admin_cannot_create_user_without_body(api_client, data_fixture):
user, token = data_fixture.create_user_and_token(
email="test@test.nl",
password="password",
first_name="Test1",
is_staff=True,
date_joined=datetime(2021, 4, 1, 1, 0, 0, 0, tzinfo=timezone.utc),
has_active_premium_license=True,
)
url = reverse("api:premium:admin:users:list")
url = reverse("api:admin:users:list")
response = api_client.post(
url,
{},
@ -575,42 +479,16 @@ def test_admin_cannot_create_user_without_body(api_client, premium_data_fixture)
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_admin_cannot_create_user_without_license(api_client, premium_data_fixture):
user, token = premium_data_fixture.create_user_and_token(
def test_admin_cannot_create_user_that_already_exists(api_client, data_fixture):
user, token = data_fixture.create_user_and_token(
email="test@test.nl",
password="password",
first_name="Test1",
is_staff=True,
date_joined=datetime(2021, 4, 1, 1, 0, 0, 0, tzinfo=timezone.utc),
has_active_premium_license=False,
)
url = reverse("api:premium:admin:users:list")
response = api_client.post(
url,
{"username": "test2@test.nl", "password": "Test1234", "name": "Test1"},
format="json",
HTTP_AUTHORIZATION=f"JWT {token}",
)
user.refresh_from_db()
print(response.json())
assert response.status_code == HTTP_402_PAYMENT_REQUIRED
response_json = response.json()
assert response_json["error"] == "ERROR_FEATURE_NOT_AVAILABLE"
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_admin_cannot_create_user_that_already_exists(api_client, premium_data_fixture):
user, token = premium_data_fixture.create_user_and_token(
email="test@test.nl",
password="password",
first_name="Test1",
is_staff=True,
date_joined=datetime(2021, 4, 1, 1, 0, 0, 0, tzinfo=timezone.utc),
has_active_premium_license=True,
)
premium_data_fixture.create_user(email="test2@test.nl")
url = reverse("api:premium:admin:users:list")
data_fixture.create_user(email="test2@test.nl")
url = reverse("api:admin:users:list")
response = api_client.post(
url,
{"username": "test2@test.nl", "password": "Test1234", "name": "Test1"},
@ -625,18 +503,17 @@ def test_admin_cannot_create_user_that_already_exists(api_client, premium_data_f
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_admin_can_create_user(api_client, premium_data_fixture):
user = premium_data_fixture.create_user(
def test_admin_can_create_user(api_client, data_fixture):
user = data_fixture.create_user(
email="test@test.nl",
password="password",
first_name="Test1",
is_staff=True,
date_joined=datetime(2021, 4, 1, 1, 0, 0, 0, tzinfo=timezone.utc),
has_active_premium_license=True,
)
url = reverse("api:premium:admin:users:list")
url = reverse("api:admin:users:list")
with freeze_time("2020-01-02 12:00"):
token = premium_data_fixture.generate_token(user)
token = data_fixture.generate_token(user)
response = api_client.post(
url,
{
@ -673,16 +550,15 @@ def test_admin_can_create_user(api_client, premium_data_fixture):
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_admin_can_patch_user(api_client, premium_data_fixture):
user, token = premium_data_fixture.create_user_and_token(
def test_admin_can_patch_user(api_client, data_fixture):
user, token = data_fixture.create_user_and_token(
email="test@test.nl",
password="password",
first_name="Test1",
is_staff=True,
date_joined=datetime(2021, 4, 1, 1, 0, 0, 0, tzinfo=timezone.utc),
has_active_premium_license=True,
)
url = reverse("api:premium:admin:users:edit", kwargs={"user_id": user.id})
url = reverse("api:admin:users:edit", kwargs={"user_id": user.id})
old_password = user.password
response = api_client.patch(
url,
@ -707,18 +583,15 @@ def test_admin_can_patch_user(api_client, premium_data_fixture):
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_admin_can_patch_user_without_providing_password(
api_client, premium_data_fixture
):
user, token = premium_data_fixture.create_user_and_token(
def test_admin_can_patch_user_without_providing_password(api_client, data_fixture):
user, token = data_fixture.create_user_and_token(
email="test@test.nl",
password="password",
first_name="Test1",
is_staff=True,
date_joined=datetime(2021, 4, 1, 1, 0, 0, 0, tzinfo=timezone.utc),
has_active_premium_license=True,
)
url = reverse("api:premium:admin:users:edit", kwargs={"user_id": user.id})
url = reverse("api:admin:users:edit", kwargs={"user_id": user.id})
old_password = user.password
response = api_client.patch(
url,
@ -743,17 +616,16 @@ def test_admin_can_patch_user_without_providing_password(
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_admin_update_to_existing_user(api_client, premium_data_fixture):
user_to_change = premium_data_fixture.create_user()
user, token = premium_data_fixture.create_user_and_token(
def test_admin_update_to_existing_user(api_client, data_fixture):
user_to_change = data_fixture.create_user()
user, token = data_fixture.create_user_and_token(
email="test@test.nl",
password="password",
first_name="Test1",
is_staff=True,
date_joined=datetime(2021, 4, 1, 1, 0, 0, 0, tzinfo=timezone.utc),
has_active_premium_license=True,
)
url = reverse("api:premium:admin:users:edit", kwargs={"user_id": user_to_change.id})
url = reverse("api:admin:users:edit", kwargs={"user_id": user_to_change.id})
response = api_client.patch(
url,
{"username": "test@test.nl"},
@ -767,25 +639,22 @@ def test_admin_update_to_existing_user(api_client, premium_data_fixture):
@pytest.mark.django_db
@override_settings(DEBUG=True)
@pytest.mark.parametrize("invalid_password", invalid_passwords)
def test_invalid_password_returns_400(
api_client, premium_data_fixture, invalid_password
):
user, token = premium_data_fixture.create_user_and_token(
def test_invalid_password_returns_400(api_client, data_fixture, invalid_password):
user, token = data_fixture.create_user_and_token(
email="test@test.nl",
password="password",
first_name="Test1",
is_staff=True,
date_joined=datetime(2021, 4, 1, 1, 0, 0, 0, tzinfo=timezone.utc),
has_active_premium_license=True,
)
user_to_edit = premium_data_fixture.create_user(
user_to_edit = data_fixture.create_user(
email="second@test.nl",
password="password",
first_name="Test1",
is_staff=False,
)
url = reverse("api:premium:admin:users:edit", kwargs={"user_id": user_to_edit.id})
url = reverse("api:admin:users:edit", kwargs={"user_id": user_to_edit.id})
response = api_client.patch(
url,
@ -815,18 +684,15 @@ def test_invalid_password_returns_400(
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_error_returned_when_invalid_field_supplied_to_edit(
api_client, premium_data_fixture
):
user, token = premium_data_fixture.create_user_and_token(
def test_error_returned_when_invalid_field_supplied_to_edit(api_client, data_fixture):
user, token = data_fixture.create_user_and_token(
email="test@test.nl",
password="password",
first_name="Test1",
is_staff=True,
date_joined=datetime(2021, 4, 1, 1, 0, 0, 0, tzinfo=timezone.utc),
has_active_premium_license=True,
)
url = reverse("api:premium:admin:users:edit", kwargs={"user_id": user.id})
url = reverse("api:admin:users:edit", kwargs={"user_id": user.id})
# We have to provide a str as otherwise the test api client will "helpfully" try
# to serialize the dict using the endpoints serializer, which will fail before
@ -843,18 +709,15 @@ def test_error_returned_when_invalid_field_supplied_to_edit(
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_error_returned_when_updating_user_with_invalid_email(
api_client, premium_data_fixture
):
user, token = premium_data_fixture.create_user_and_token(
def test_error_returned_when_updating_user_with_invalid_email(api_client, data_fixture):
user, token = data_fixture.create_user_and_token(
email="test@test.nl",
password="password",
first_name="Test1",
is_staff=True,
date_joined=datetime(2021, 4, 1, 1, 0, 0, 0, tzinfo=timezone.utc),
has_active_premium_license=True,
)
url = reverse("api:premium:admin:users:edit", kwargs={"user_id": user.id})
url = reverse("api:admin:users:edit", kwargs={"user_id": user.id})
# We have to provide a str as otherwise the test api client will "helpfully" try
# to serialize the dict using the endpoints serializer, which will fail before
@ -872,17 +735,16 @@ def test_error_returned_when_updating_user_with_invalid_email(
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_error_returned_when_valid_and_invalid_fields_supplied_to_edit(
api_client, premium_data_fixture
api_client, data_fixture
):
user, token = premium_data_fixture.create_user_and_token(
user, token = data_fixture.create_user_and_token(
email="test@test.nl",
password="password",
first_name="Test1",
is_staff=True,
date_joined=datetime(2021, 4, 1, 1, 0, 0, 0, tzinfo=timezone.utc),
has_active_premium_license=True,
)
url = reverse("api:premium:admin:users:edit", kwargs={"user_id": user.id})
url = reverse("api:admin:users:edit", kwargs={"user_id": user.id})
# We have to provide a str as otherwise the test api client will "helpfully" try
# to serialize the dict using the endpoints serializer, which will fail before
@ -900,23 +762,22 @@ def test_error_returned_when_valid_and_invalid_fields_supplied_to_edit(
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_admin_getting_view_users_only_runs_two_queries_instead_of_n(
premium_data_fixture, django_assert_num_queries, api_client
data_fixture, django_assert_num_queries, api_client
):
_, token = premium_data_fixture.create_user_and_token(
_, token = data_fixture.create_user_and_token(
email="test@test.nl",
password="password",
first_name="Test1",
is_staff=True,
has_active_premium_license=True,
)
fixed_num_of_queries_unrelated_to_number_of_rows = 6
fixed_num_of_queries_unrelated_to_number_of_rows = 5
for i in range(10):
premium_data_fixture.create_user_workspace()
data_fixture.create_user_workspace()
with django_assert_num_queries(fixed_num_of_queries_unrelated_to_number_of_rows):
response = api_client.get(
reverse("api:premium:admin:users:list"),
reverse("api:admin:users:list"),
format="json",
HTTP_AUTHORIZATION=f"JWT {token}",
)
@ -925,11 +786,11 @@ def test_admin_getting_view_users_only_runs_two_queries_instead_of_n(
# Make even more to ensure that more rows don't result in more queries.
for i in range(10):
premium_data_fixture.create_user_workspace()
data_fixture.create_user_workspace()
with django_assert_num_queries(fixed_num_of_queries_unrelated_to_number_of_rows):
response = api_client.get(
reverse("api:premium:admin:users:list"),
reverse("api:admin:users:list"),
format="json",
HTTP_AUTHORIZATION=f"JWT {token}",
)
@ -939,38 +800,15 @@ def test_admin_getting_view_users_only_runs_two_queries_instead_of_n(
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_admin_impersonate_user_without_premium_license(
api_client, premium_data_fixture
):
staff_user, token = premium_data_fixture.create_user_and_token(
def test_admin_impersonate_not_existing_user(api_client, data_fixture):
_, token = data_fixture.create_user_and_token(
email="test@test.nl",
password="password",
first_name="Test1",
is_staff=True,
date_joined=datetime(2021, 4, 1, 1, 0, 0, 0, tzinfo=timezone.utc),
)
response = api_client.post(
reverse("api:premium:admin:users:impersonate"),
{"user": 0},
format="json",
HTTP_AUTHORIZATION=f"JWT {token}",
)
assert response.status_code == HTTP_402_PAYMENT_REQUIRED
assert response.json()["error"] == "ERROR_FEATURE_NOT_AVAILABLE"
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_admin_impersonate_not_existing_user(api_client, premium_data_fixture):
_, token = premium_data_fixture.create_user_and_token(
email="test@test.nl",
password="password",
first_name="Test1",
is_staff=True,
has_active_premium_license=True,
)
response = api_client.post(
reverse("api:premium:admin:users:impersonate"),
reverse("api:admin:users:impersonate"),
{"user": 0},
format="json",
HTTP_AUTHORIZATION=f"JWT {token}",
@ -982,20 +820,19 @@ def test_admin_impersonate_not_existing_user(api_client, premium_data_fixture):
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_admin_impersonate_user_as_normal_user(api_client, premium_data_fixture):
_, token = premium_data_fixture.create_user_and_token(
def test_admin_impersonate_user_as_normal_user(api_client, data_fixture):
_, token = data_fixture.create_user_and_token(
email="test@test.nl",
password="password",
first_name="Test1",
is_staff=False,
is_superuser=False,
has_active_premium_license=True,
)
user_to_impersonate = premium_data_fixture.create_user(
user_to_impersonate = data_fixture.create_user(
email="specific_user@test.nl", password="password", first_name="Test1"
)
response = api_client.post(
reverse("api:premium:admin:users:impersonate"),
reverse("api:admin:users:impersonate"),
{"user": user_to_impersonate.id},
format="json",
HTTP_AUTHORIZATION=f"JWT {token}",
@ -1005,19 +842,18 @@ def test_admin_impersonate_user_as_normal_user(api_client, premium_data_fixture)
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_admin_impersonate_user(api_client, premium_data_fixture):
_, token = premium_data_fixture.create_user_and_token(
def test_admin_impersonate_user(api_client, data_fixture):
_, token = data_fixture.create_user_and_token(
email="test@test.nl",
password="password",
first_name="Test1",
is_staff=True,
has_active_premium_license=True,
)
user_to_impersonate = premium_data_fixture.create_user(
user_to_impersonate = data_fixture.create_user(
email="specific_user@test.nl", password="password", first_name="Test1"
)
response = api_client.post(
reverse("api:premium:admin:users:impersonate"),
reverse("api:admin:users:impersonate"),
{"user": user_to_impersonate.id},
format="json",
HTTP_AUTHORIZATION=f"JWT {token}",
@ -1035,27 +871,26 @@ def test_admin_impersonate_user(api_client, premium_data_fixture):
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_admin_impersonate_staff_or_superuser(api_client, premium_data_fixture):
_, token = premium_data_fixture.create_user_and_token(
def test_admin_impersonate_staff_or_superuser(api_client, data_fixture):
_, token = data_fixture.create_user_and_token(
email="test@test.nl",
password="password",
first_name="Test1",
is_staff=True,
has_active_premium_license=True,
)
user_to_impersonate_superuser = premium_data_fixture.create_user(
user_to_impersonate_superuser = data_fixture.create_user(
email="specific_user@test.nl",
password="password",
first_name="Test1",
is_superuser=True,
)
user_to_impersonate_staff = premium_data_fixture.create_user(
user_to_impersonate_staff = data_fixture.create_user(
email="specific_user2@test.nl",
password="password",
first_name="Test1",
is_staff=True,
)
user_to_impersonate_superuser_staff = premium_data_fixture.create_user(
user_to_impersonate_superuser_staff = data_fixture.create_user(
email="specific_user3@test.nl",
password="password",
first_name="Test1",
@ -1063,7 +898,7 @@ def test_admin_impersonate_staff_or_superuser(api_client, premium_data_fixture):
is_superuser=True,
)
response = api_client.post(
reverse("api:premium:admin:users:impersonate"),
reverse("api:admin:users:impersonate"),
{"user": user_to_impersonate_superuser.id},
format="json",
HTTP_AUTHORIZATION=f"JWT {token}",
@ -1073,7 +908,7 @@ def test_admin_impersonate_staff_or_superuser(api_client, premium_data_fixture):
assert response_json["user"][0].startswith("Invalid pk")
response = api_client.post(
reverse("api:premium:admin:users:impersonate"),
reverse("api:admin:users:impersonate"),
{"user": user_to_impersonate_staff.id},
format="json",
HTTP_AUTHORIZATION=f"JWT {token}",
@ -1083,7 +918,7 @@ def test_admin_impersonate_staff_or_superuser(api_client, premium_data_fixture):
assert response_json["user"][0].startswith("Invalid pk")
response = api_client.post(
reverse("api:premium:admin:users:impersonate"),
reverse("api:admin:users:impersonate"),
{"user": user_to_impersonate_superuser_staff.id},
format="json",
HTTP_AUTHORIZATION=f"JWT {token}",

View file

@ -4,36 +4,32 @@ from zoneinfo import ZoneInfo
from django.test.utils import override_settings
import pytest
from baserow_premium.admin.dashboard.handler import AdminDashboardHandler
from baserow.core.admin.dashboard.handler import AdminDashboardHandler
from baserow.core.models import UserLogEntry
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_get_new_user_counts(premium_data_fixture):
def test_get_new_user_counts(data_fixture):
tz = timezone.utc
premium_data_fixture.create_user(date_joined=datetime(2020, 12, 30, tzinfo=tz))
premium_data_fixture.create_user(date_joined=datetime(2021, 1, 1, tzinfo=tz))
premium_data_fixture.create_user(date_joined=datetime(2021, 1, 2, tzinfo=tz))
premium_data_fixture.create_user(date_joined=datetime(2021, 1, 3, tzinfo=tz))
premium_data_fixture.create_user(date_joined=datetime(2021, 1, 4, tzinfo=tz))
premium_data_fixture.create_user(date_joined=datetime(2021, 1, 5, tzinfo=tz))
premium_data_fixture.create_user(date_joined=datetime(2021, 1, 10, tzinfo=tz))
premium_data_fixture.create_user(date_joined=datetime(2021, 1, 23, tzinfo=tz))
premium_data_fixture.create_user(date_joined=datetime(2021, 1, 24, tzinfo=tz))
premium_data_fixture.create_user(date_joined=datetime(2021, 1, 25, tzinfo=tz))
premium_data_fixture.create_user(date_joined=datetime(2021, 1, 26, tzinfo=tz))
premium_data_fixture.create_user(date_joined=datetime(2021, 1, 27, tzinfo=tz))
premium_data_fixture.create_user(date_joined=datetime(2021, 1, 28, tzinfo=tz))
premium_data_fixture.create_user(date_joined=datetime(2021, 1, 29, tzinfo=tz))
premium_data_fixture.create_user(
date_joined=datetime(2021, 1, 30, 12, 1, tzinfo=tz)
)
premium_data_fixture.create_user(
date_joined=datetime(2021, 1, 30, 15, 1, tzinfo=tz)
)
data_fixture.create_user(date_joined=datetime(2020, 12, 30, tzinfo=tz))
data_fixture.create_user(date_joined=datetime(2021, 1, 1, tzinfo=tz))
data_fixture.create_user(date_joined=datetime(2021, 1, 2, tzinfo=tz))
data_fixture.create_user(date_joined=datetime(2021, 1, 3, tzinfo=tz))
data_fixture.create_user(date_joined=datetime(2021, 1, 4, tzinfo=tz))
data_fixture.create_user(date_joined=datetime(2021, 1, 5, tzinfo=tz))
data_fixture.create_user(date_joined=datetime(2021, 1, 10, tzinfo=tz))
data_fixture.create_user(date_joined=datetime(2021, 1, 23, tzinfo=tz))
data_fixture.create_user(date_joined=datetime(2021, 1, 24, tzinfo=tz))
data_fixture.create_user(date_joined=datetime(2021, 1, 25, tzinfo=tz))
data_fixture.create_user(date_joined=datetime(2021, 1, 26, tzinfo=tz))
data_fixture.create_user(date_joined=datetime(2021, 1, 27, tzinfo=tz))
data_fixture.create_user(date_joined=datetime(2021, 1, 28, tzinfo=tz))
data_fixture.create_user(date_joined=datetime(2021, 1, 29, tzinfo=tz))
data_fixture.create_user(date_joined=datetime(2021, 1, 30, 12, 1, tzinfo=tz))
data_fixture.create_user(date_joined=datetime(2021, 1, 30, 15, 1, tzinfo=tz))
handler = AdminDashboardHandler()
now = datetime(2021, 1, 30, 23, 59, tzinfo=tz)
@ -74,12 +70,12 @@ def test_get_new_user_counts(premium_data_fixture):
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_get_active_user_counts(premium_data_fixture):
def test_get_active_user_counts(data_fixture):
tz = timezone.utc
user_1 = premium_data_fixture.create_user()
user_2 = premium_data_fixture.create_user()
user_3 = premium_data_fixture.create_user()
user_1 = data_fixture.create_user()
user_2 = data_fixture.create_user()
user_3 = data_fixture.create_user()
def create_entries(user, dates):
for d in dates:
@ -192,32 +188,18 @@ def test_get_active_user_counts(premium_data_fixture):
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_get_new_users_per_day(premium_data_fixture):
def test_get_new_users_per_day(data_fixture):
utc = timezone.utc
gmt3 = ZoneInfo("Etc/GMT+3")
premium_data_fixture.create_user(
date_joined=datetime(2020, 12, 29, 12, 1, tzinfo=utc)
)
premium_data_fixture.create_user(date_joined=datetime(2021, 1, 1, 1, 1, tzinfo=utc))
premium_data_fixture.create_user(
date_joined=datetime(2021, 1, 1, 12, 1, tzinfo=utc)
)
premium_data_fixture.create_user(
date_joined=datetime(2021, 1, 2, 12, 1, tzinfo=utc)
)
premium_data_fixture.create_user(
date_joined=datetime(2021, 1, 2, 12, 1, tzinfo=utc)
)
premium_data_fixture.create_user(
date_joined=datetime(2021, 1, 2, 12, 1, tzinfo=utc)
)
premium_data_fixture.create_user(
date_joined=datetime(2021, 1, 30, 12, 1, tzinfo=utc)
)
premium_data_fixture.create_user(
date_joined=datetime(2021, 1, 30, 15, 1, tzinfo=utc)
)
data_fixture.create_user(date_joined=datetime(2020, 12, 29, 12, 1, tzinfo=utc))
data_fixture.create_user(date_joined=datetime(2021, 1, 1, 1, 1, tzinfo=utc))
data_fixture.create_user(date_joined=datetime(2021, 1, 1, 12, 1, tzinfo=utc))
data_fixture.create_user(date_joined=datetime(2021, 1, 2, 12, 1, tzinfo=utc))
data_fixture.create_user(date_joined=datetime(2021, 1, 2, 12, 1, tzinfo=utc))
data_fixture.create_user(date_joined=datetime(2021, 1, 2, 12, 1, tzinfo=utc))
data_fixture.create_user(date_joined=datetime(2021, 1, 30, 12, 1, tzinfo=utc))
data_fixture.create_user(date_joined=datetime(2021, 1, 30, 15, 1, tzinfo=utc))
handler = AdminDashboardHandler()
@ -248,13 +230,13 @@ def test_get_new_users_per_day(premium_data_fixture):
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_get_active_users_per_day(premium_data_fixture):
def test_get_active_users_per_day(data_fixture):
utc = timezone.utc
gmt3 = ZoneInfo("Etc/GMT+3")
user_1 = premium_data_fixture.create_user()
user_2 = premium_data_fixture.create_user()
user_3 = premium_data_fixture.create_user()
user_1 = data_fixture.create_user()
user_2 = data_fixture.create_user()
user_3 = data_fixture.create_user()
def create_entries(user, dates):
for d in dates:

View file

@ -0,0 +1,63 @@
from unittest.mock import patch
from django.db import connection
from django.test.utils import override_settings
import pytest
from baserow.contrib.database.models import Database, Table
from baserow.core.admin.workspaces.exceptions import CannotDeleteATemplateGroupError
from baserow.core.admin.workspaces.handler import WorkspacesAdminHandler
from baserow.core.exceptions import IsNotAdminError
from baserow.core.models import Workspace, WorkspaceUser
@pytest.mark.django_db
@override_settings(DEBUG=True)
@patch("baserow.core.signals.workspace_deleted.send")
def test_delete_workspace(send_mock, data_fixture):
staff_user = data_fixture.create_user(is_staff=True)
normal_user = data_fixture.create_user(is_staff=False)
other_user = data_fixture.create_user()
workspace_1 = data_fixture.create_workspace(user=other_user)
database = data_fixture.create_database_application(workspace=workspace_1)
table = data_fixture.create_database_table(database=database)
handler = WorkspacesAdminHandler()
with pytest.raises(IsNotAdminError):
handler.delete_workspace(normal_user, workspace_1)
handler.delete_workspace(staff_user, workspace_1)
send_mock.assert_called_once()
assert send_mock.call_args[1]["workspace"].id == workspace_1.id
assert "user" not in send_mock.call_args[1]
assert len(send_mock.call_args[1]["workspace_users"]) == 1
assert send_mock.call_args[1]["workspace_users"][0].id == other_user.id
assert Database.objects.all().count() == 0
assert Table.objects.all().count() == 0
assert f"database_table_{table.id}" not in connection.introspection.table_names()
assert Workspace.objects.all().count() == 0
assert WorkspaceUser.objects.all().count() == 0
@pytest.mark.django_db
@override_settings(DEBUG=True)
@patch("baserow.core.signals.workspace_deleted.send")
def test_cant_delete_template_workspace(send_mock, data_fixture):
staff_user = data_fixture.create_user(is_staff=True)
workspace_1 = data_fixture.create_workspace(user=staff_user)
database = data_fixture.create_database_application(workspace=workspace_1)
data_fixture.create_database_table(database=database)
data_fixture.create_template(workspace=workspace_1)
handler = WorkspacesAdminHandler()
with pytest.raises(CannotDeleteATemplateGroupError):
handler.delete_workspace(staff_user, workspace_1)
send_mock.assert_not_called()
assert Workspace.objects.all().count() == 1

View file

@ -2,14 +2,13 @@ from django.contrib.auth import get_user_model
from django.test.utils import override_settings
import pytest
from baserow_premium.admin.users.exceptions import (
from baserow.core.admin.users.exceptions import (
CannotDeactivateYourselfException,
CannotDeleteYourselfException,
UserDoesNotExistException,
)
from baserow_premium.admin.users.handler import UserAdminHandler
from baserow_premium.license.exceptions import FeaturesNotAvailableError
from baserow.core.admin.users.handler import UserAdminHandler
from baserow.core.exceptions import IsNotAdminError
from baserow.core.user.exceptions import (
PasswordDoesNotMatchValidation,
@ -37,21 +36,19 @@ invalid_passwords = [
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_admin_can_delete_user(premium_data_fixture):
def test_admin_can_delete_user(data_fixture):
handler = UserAdminHandler()
admin_user = premium_data_fixture.create_user(
admin_user = data_fixture.create_user(
email="test@test.nl",
password="password",
first_name="Test1",
is_staff=True,
has_active_premium_license=True,
)
user_to_delete = premium_data_fixture.create_user(
user_to_delete = data_fixture.create_user(
email="delete_me@test.nl",
password="password",
first_name="Test1",
is_staff=True,
has_active_premium_license=True,
)
handler.delete_user(admin_user, user_to_delete.id)
assert not User.objects.filter(id=user_to_delete.id).exists()
@ -59,14 +56,13 @@ def test_admin_can_delete_user(premium_data_fixture):
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_non_admin_cant_delete_user(premium_data_fixture):
def test_non_admin_cant_delete_user(data_fixture):
handler = UserAdminHandler()
non_admin_user = premium_data_fixture.create_user(
non_admin_user = data_fixture.create_user(
email="test@test.nl",
password="password",
first_name="Test1",
is_staff=False,
has_active_premium_license=True,
)
with pytest.raises(IsNotAdminError):
handler.delete_user(non_admin_user, non_admin_user.id)
@ -74,36 +70,20 @@ def test_non_admin_cant_delete_user(premium_data_fixture):
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_admin_delete_user_without_premium_license(premium_data_fixture):
def test_admin_can_modify_allowed_user_attributes(data_fixture):
handler = UserAdminHandler()
admin_user = premium_data_fixture.create_user(
admin_user = data_fixture.create_user(
email="test@test.nl",
password="password",
first_name="Test1",
is_staff=True,
)
with pytest.raises(FeaturesNotAvailableError):
handler.delete_user(admin_user, admin_user.id)
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_admin_can_modify_allowed_user_attributes(premium_data_fixture):
handler = UserAdminHandler()
admin_user = premium_data_fixture.create_user(
email="test@test.nl",
password="password",
first_name="Test1",
is_staff=True,
has_active_premium_license=True,
)
user_to_modify = premium_data_fixture.create_user(
user_to_modify = data_fixture.create_user(
email="delete_me@test.nl",
password="password",
first_name="Test1",
is_staff=False,
is_active=False,
has_active_premium_license=True,
)
old_password = user_to_modify.password
handler.update_user(
@ -128,28 +108,25 @@ def test_admin_can_modify_allowed_user_attributes(premium_data_fixture):
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_admin_can_deactive_and_unstaff_other_users(premium_data_fixture):
def test_admin_can_deactive_and_unstaff_other_users(data_fixture):
handler = UserAdminHandler()
admin_user = premium_data_fixture.create_user(
admin_user = data_fixture.create_user(
email="test@test.nl",
password="password",
first_name="Test1",
is_staff=True,
has_active_premium_license=True,
)
staff_user = premium_data_fixture.create_user(
staff_user = data_fixture.create_user(
email="staff@test.nl",
password="password",
first_name="Test1",
is_staff=True,
has_active_premium_license=True,
)
active_user = premium_data_fixture.create_user(
active_user = data_fixture.create_user(
email="active@test.nl",
password="password",
first_name="Test1",
is_active=True,
has_active_premium_license=True,
)
handler.update_user(
@ -171,14 +148,13 @@ def test_admin_can_deactive_and_unstaff_other_users(premium_data_fixture):
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_create_user(premium_data_fixture):
def test_create_user(data_fixture):
handler = UserAdminHandler()
admin_user = premium_data_fixture.create_user(
admin_user = data_fixture.create_user(
email="test@test.nl",
password="password",
first_name="Test1",
is_staff=True,
has_active_premium_license=True,
)
user = handler.create_user(
requesting_user=admin_user,
@ -201,14 +177,13 @@ def test_create_user(premium_data_fixture):
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_create_user_as_non_admin(premium_data_fixture):
def test_create_user_as_non_admin(data_fixture):
handler = UserAdminHandler()
admin_user = premium_data_fixture.create_user(
admin_user = data_fixture.create_user(
email="test@test.nl",
password="password",
first_name="Test1",
is_staff=False,
has_active_premium_license=True,
)
with pytest.raises(IsNotAdminError):
@ -224,37 +199,13 @@ def test_create_user_as_non_admin(premium_data_fixture):
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_create_user_without_license(premium_data_fixture):
def test_create_user_that_already_exists(data_fixture):
handler = UserAdminHandler()
admin_user = premium_data_fixture.create_user(
email="test@test.nl",
password="password",
first_name="Test1",
is_staff=False,
has_active_premium_license=False,
)
with pytest.raises(FeaturesNotAvailableError):
handler.create_user(
requesting_user=admin_user,
username="new@test.nl",
name="Test",
password="password",
is_active=True,
is_staff=True,
)
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_create_user_that_already_exists(premium_data_fixture):
handler = UserAdminHandler()
admin_user = premium_data_fixture.create_user(
admin_user = data_fixture.create_user(
email="test@test.nl",
password="password",
first_name="Test1",
is_staff=True,
has_active_premium_license=True,
)
with pytest.raises(UserAlreadyExist):
@ -270,14 +221,13 @@ def test_create_user_that_already_exists(premium_data_fixture):
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_create_user_with_invalid_password(premium_data_fixture):
def test_create_user_with_invalid_password(data_fixture):
handler = UserAdminHandler()
admin_user = premium_data_fixture.create_user(
admin_user = data_fixture.create_user(
email="test@test.nl",
password="password",
first_name="Test1",
is_staff=True,
has_active_premium_license=True,
)
with pytest.raises(PasswordDoesNotMatchValidation):
@ -294,23 +244,21 @@ def test_create_user_with_invalid_password(premium_data_fixture):
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_updating_a_users_password_uses_djangos_built_in_smart_set_password(
premium_data_fixture, mocker
data_fixture, mocker
):
handler = UserAdminHandler()
admin_user = premium_data_fixture.create_user(
admin_user = data_fixture.create_user(
email="test@test.nl",
password="password",
first_name="Test1",
is_staff=True,
has_active_premium_license=True,
)
user_to_modify = premium_data_fixture.create_user(
user_to_modify = data_fixture.create_user(
email="delete_me@test.nl",
password="password",
first_name="Test1",
is_staff=False,
is_active=False,
has_active_premium_license=True,
)
old_password_hash = user_to_modify.password
set_password_spy = mocker.spy(User, "set_password")
@ -328,25 +276,23 @@ def test_updating_a_users_password_uses_djangos_built_in_smart_set_password(
@override_settings(DEBUG=True)
@pytest.mark.parametrize("invalid_password", invalid_passwords)
def test_updating_a_users_password_with_invalid_password_raises_error(
premium_data_fixture, invalid_password
data_fixture, invalid_password
):
handler = UserAdminHandler()
valid_password = "thisIsAValidPassword"
admin_user = premium_data_fixture.create_user(
admin_user = data_fixture.create_user(
email="test@test.nl",
password=valid_password,
first_name="Test1",
is_staff=True,
has_active_premium_license=True,
)
user_to_modify = premium_data_fixture.create_user(
user_to_modify = data_fixture.create_user(
email="delete_me@test.nl",
password=valid_password,
first_name="Test1",
is_staff=False,
is_active=False,
has_active_premium_license=True,
)
with pytest.raises(PasswordDoesNotMatchValidation):
@ -361,14 +307,13 @@ def test_updating_a_users_password_with_invalid_password_raises_error(
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_non_admin_cant_edit_user(premium_data_fixture):
def test_non_admin_cant_edit_user(data_fixture):
handler = UserAdminHandler()
non_admin_user = premium_data_fixture.create_user(
non_admin_user = data_fixture.create_user(
email="test@test.nl",
password="password",
first_name="Test1",
is_staff=False,
has_active_premium_license=True,
)
with pytest.raises(IsNotAdminError):
handler.update_user(non_admin_user, non_admin_user.id, "new_email@example.com")
@ -378,15 +323,14 @@ def test_non_admin_cant_edit_user(premium_data_fixture):
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_admin_cant_deactivate_themselves(premium_data_fixture):
def test_admin_cant_deactivate_themselves(data_fixture):
handler = UserAdminHandler()
admin_user = premium_data_fixture.create_user(
admin_user = data_fixture.create_user(
email="test@test.nl",
password="password",
first_name="Test1",
is_staff=True,
is_active=True,
has_active_premium_license=True,
)
with pytest.raises(CannotDeactivateYourselfException):
handler.update_user(
@ -400,15 +344,14 @@ def test_admin_cant_deactivate_themselves(premium_data_fixture):
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_admin_cant_destaff_themselves(premium_data_fixture):
def test_admin_cant_destaff_themselves(data_fixture):
handler = UserAdminHandler()
admin_user = premium_data_fixture.create_user(
admin_user = data_fixture.create_user(
email="test@test.nl",
password="password",
first_name="Test1",
is_staff=True,
is_active=True,
has_active_premium_license=True,
)
with pytest.raises(CannotDeactivateYourselfException):
handler.update_user(
@ -422,29 +365,14 @@ def test_admin_cant_destaff_themselves(premium_data_fixture):
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_admin_update_user_without_premium_license(premium_data_fixture):
def test_admin_cant_delete_themselves(data_fixture):
handler = UserAdminHandler()
admin_user = premium_data_fixture.create_user(
email="test@test.nl",
password="password",
first_name="Test1",
is_staff=True,
)
with pytest.raises(FeaturesNotAvailableError):
handler.update_user(admin_user, admin_user.id)
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_admin_cant_delete_themselves(premium_data_fixture):
handler = UserAdminHandler()
admin_user = premium_data_fixture.create_user(
admin_user = data_fixture.create_user(
email="test@test.nl",
password="password",
first_name="Test1",
is_staff=True,
is_active=True,
has_active_premium_license=True,
)
with pytest.raises(CannotDeleteYourselfException):
handler.delete_user(admin_user, admin_user.id)
@ -454,15 +382,14 @@ def test_admin_cant_delete_themselves(premium_data_fixture):
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_raises_exception_when_deleting_an_unknown_user(premium_data_fixture):
def test_raises_exception_when_deleting_an_unknown_user(data_fixture):
handler = UserAdminHandler()
admin_user = premium_data_fixture.create_user(
admin_user = data_fixture.create_user(
email="test@test.nl",
password="password",
first_name="Test1",
is_staff=True,
is_active=True,
has_active_premium_license=True,
)
with pytest.raises(UserDoesNotExistException):
handler.delete_user(admin_user, 99999)
@ -470,15 +397,14 @@ def test_raises_exception_when_deleting_an_unknown_user(premium_data_fixture):
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_raises_exception_when_updating_an_unknown_user(premium_data_fixture):
def test_raises_exception_when_updating_an_unknown_user(data_fixture):
handler = UserAdminHandler()
admin_user = premium_data_fixture.create_user(
admin_user = data_fixture.create_user(
email="test@test.nl",
password="password",
first_name="Test1",
is_staff=True,
is_active=True,
has_active_premium_license=True,
)
with pytest.raises(UserDoesNotExistException):
handler.update_user(admin_user, 99999, username="new_password")
@ -486,17 +412,16 @@ def test_raises_exception_when_updating_an_unknown_user(premium_data_fixture):
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_raises_exception_when_changing_to_an_existing_user(premium_data_fixture):
premium_data_fixture.create_user(email="existing@test.nl")
def test_raises_exception_when_changing_to_an_existing_user(data_fixture):
data_fixture.create_user(email="existing@test.nl")
handler = UserAdminHandler()
admin_user = premium_data_fixture.create_user(
admin_user = data_fixture.create_user(
email="test@test.nl",
password="password",
first_name="Test1",
is_staff=True,
is_active=True,
has_active_premium_license=True,
)
with pytest.raises(UserAlreadyExist):
handler.update_user(admin_user, admin_user.id, username="existing@test.nl")
@ -504,15 +429,14 @@ def test_raises_exception_when_changing_to_an_existing_user(premium_data_fixture
@pytest.mark.django_db
@override_settings(DEBUG=True)
def test_does_not_raise_exception_when_changing_to_same_username(premium_data_fixture):
def test_does_not_raise_exception_when_changing_to_same_username(data_fixture):
handler = UserAdminHandler()
admin_user = premium_data_fixture.create_user(
admin_user = data_fixture.create_user(
email="test@test.nl",
password="password",
first_name="Test1",
is_staff=True,
is_active=True,
has_active_premium_license=True,
)
assert (
handler.update_user(admin_user, admin_user.id, username="test@test.nl").email

View file

@ -0,0 +1,7 @@
{
"type": "refactor",
"message": "Moved instance admin dashboard, user, and workspace to the open source core.",
"issue_number": 3241,
"bullet_points": [],
"created_at": "2024-12-06"
}

View file

@ -1,7 +1,6 @@
from django.db import transaction
from django.utils import translation
from baserow_premium.api.admin.views import APIListingView
from baserow_premium.license.handler import LicenseHandler
from drf_spectacular.types import OpenApiTypes
from drf_spectacular.utils import OpenApiParameter, extend_schema
@ -10,6 +9,7 @@ from rest_framework.response import Response
from rest_framework.status import HTTP_202_ACCEPTED
from rest_framework.views import APIView
from baserow.api.admin.views import APIListingView
from baserow.api.decorators import (
map_exceptions,
validate_body,

View file

@ -1,9 +0,0 @@
from django.urls import re_path
from baserow_premium.api.admin.dashboard.views import AdminDashboardView
app_name = "baserow_premium.api.admin.dashboard"
urlpatterns = [
re_path(r"^$", AdminDashboardView.as_view(), name="dashboard"),
]

View file

@ -1,6 +1,5 @@
from django.urls import include, path
from .admin import urls as admin_urls
from .fields import urls as field_urls
from .license import urls as license_urls
from .row_comments import urls as row_comments_urls
@ -10,7 +9,6 @@ app_name = "baserow_premium.api"
urlpatterns = [
path("licenses/", include(license_urls, namespace="license")),
path("admin/", include(admin_urls, namespace="admin")),
path("row_comments/", include(row_comments_urls, namespace="row_comments")),
path("database/view/", include(view_urls, namespace="view")),
path("database/fields/", include(field_urls, namespace="fields")),

View file

@ -1,87 +0,0 @@
from unittest.mock import patch
from django.db import connection
from django.test.utils import override_settings
import pytest
from baserow_premium.admin.workspaces.exceptions import CannotDeleteATemplateGroupError
from baserow_premium.admin.workspaces.handler import WorkspacesAdminHandler
from baserow_premium.license.exceptions import FeaturesNotAvailableError
from baserow.contrib.database.models import Database, Table
from baserow.core.exceptions import IsNotAdminError
from baserow.core.models import Workspace, WorkspaceUser
@pytest.mark.django_db
@override_settings(DEBUG=True)
@patch("baserow.core.signals.workspace_deleted.send")
def test_delete_workspace(send_mock, premium_data_fixture):
staff_user_with_premium_license = premium_data_fixture.create_user(
is_staff=True, has_active_premium_license=True
)
normal_user = premium_data_fixture.create_user(
is_staff=False, has_active_premium_license=True
)
other_user = premium_data_fixture.create_user()
workspace_1 = premium_data_fixture.create_workspace(user=other_user)
database = premium_data_fixture.create_database_application(workspace=workspace_1)
table = premium_data_fixture.create_database_table(database=database)
handler = WorkspacesAdminHandler()
with pytest.raises(IsNotAdminError):
handler.delete_workspace(normal_user, workspace_1)
handler.delete_workspace(staff_user_with_premium_license, workspace_1)
send_mock.assert_called_once()
assert send_mock.call_args[1]["workspace"].id == workspace_1.id
assert "user" not in send_mock.call_args[1]
assert len(send_mock.call_args[1]["workspace_users"]) == 1
assert send_mock.call_args[1]["workspace_users"][0].id == other_user.id
assert Database.objects.all().count() == 0
assert Table.objects.all().count() == 0
assert f"database_table_{table.id}" not in connection.introspection.table_names()
assert Workspace.objects.all().count() == 0
assert WorkspaceUser.objects.all().count() == 0
@pytest.mark.django_db
@override_settings(DEBUG=True)
@patch("baserow.core.signals.workspace_deleted.send")
def test_cant_delete_template_workspace(send_mock, premium_data_fixture):
staff_user = premium_data_fixture.create_user(
is_staff=True, has_active_premium_license=True
)
workspace_1 = premium_data_fixture.create_workspace(user=staff_user)
database = premium_data_fixture.create_database_application(workspace=workspace_1)
premium_data_fixture.create_database_table(database=database)
premium_data_fixture.create_template(workspace=workspace_1)
handler = WorkspacesAdminHandler()
with pytest.raises(CannotDeleteATemplateGroupError):
handler.delete_workspace(staff_user, workspace_1)
send_mock.assert_not_called()
assert Workspace.objects.all().count() == 1
@pytest.mark.django_db
@override_settings(DEBUG=True)
@patch("baserow.core.signals.workspace_deleted.send")
def test_delete_workspace_without_premium_license(send_mock, premium_data_fixture):
staff_user = premium_data_fixture.create_user(is_staff=True)
other_user = premium_data_fixture.create_user()
workspace_1 = premium_data_fixture.create_workspace(user=other_user)
handler = WorkspacesAdminHandler()
with pytest.raises(FeaturesNotAvailableError):
handler.delete_workspace(staff_user, workspace_1)
send_mock.assert_not_called()
assert Workspace.objects.all().count() == 1

View file

@ -1,95 +1,4 @@
import { AdminType } from '@baserow/modules/core/adminTypes'
import PremiumFeatures from '@baserow_premium/features'
import PremiumModal from '@baserow_premium/components/PremiumModal'
class PremiumAdminType extends AdminType {
isDeactivated() {
return !this.app.$hasFeature(PremiumFeatures.PREMIUM)
}
getDeactivatedModal() {
return PremiumModal
}
}
export class DashboardType extends PremiumAdminType {
static getType() {
return 'dashboard'
}
getIconClass() {
return 'iconoir-home-simple'
}
getName() {
const { i18n } = this.app
return i18n.t('premium.adminType.dashboard')
}
getRouteName() {
return 'admin-dashboard'
}
getOrder() {
return 1
}
}
export class UsersAdminType extends PremiumAdminType {
static getType() {
return 'users'
}
getIconClass() {
return 'iconoir-community'
}
getName() {
const { i18n } = this.app
return i18n.t('premium.adminType.users')
}
getCategory() {
const { i18n } = this.app
return i18n.t('sidebar.people')
}
getRouteName() {
return 'admin-users'
}
getOrder() {
return 2
}
}
export class WorkspacesAdminType extends PremiumAdminType {
static getType() {
return 'workspaces'
}
getIconClass() {
return 'baserow-icon-groups'
}
getName() {
const { i18n } = this.app
return i18n.t('premium.adminType.workspaces')
}
getCategory() {
const { i18n } = this.app
return i18n.t('sidebar.people')
}
getRouteName() {
return 'admin-workspaces'
}
getOrder() {
return 3
}
}
export class LicensesAdminType extends AdminType {
static getType() {

View file

@ -1,7 +1,4 @@
@import 'premium_features';
@import 'admin_dashboard';
@import 'user_admin';
@import 'group_admin';
@import 'row_comments';
@import 'expandable_textarea';
@import 'licenses';

View file

@ -20,10 +20,6 @@
<i class="iconoir-check premium-features__feature-icon"></i>
{{ $t('premiumFeatures.exports') }}
</li>
<li class="premium-features__feature">
<i class="iconoir-check premium-features__feature-icon"></i>
{{ $t('premiumFeatures.admin') }}
</li>
<li class="premium-features__feature">
<i class="iconoir-check premium-features__feature-icon"></i>
{{ $t('premiumFeatures.rowColoring') }}

View file

@ -1,15 +1,6 @@
{
"premium": {
"user": {
"isStaff": "Ist Personal",
"isWorkspaceAdmin": "Ist Arbeitsbereichadministrator",
"active": "Aktiv",
"deactivated": "Deaktiviert"
},
"adminType": {
"dashboard": "Dashboard",
"users": "Benutzer",
"workspaces": "Arbeitsbereiche",
"licenses": "Lizenzen verwalten"
},
"viewType": {
@ -70,83 +61,6 @@
"registerLicenseForm": {
"licenseKey": "Lizenzschlüssel"
},
"workspacesAdminTable": {
"allWorkspaces": "Alle Arbeitsbereiche",
"id": "ID",
"name": "Name",
"members": "Mitglieder",
"applications": "Anwendungen",
"created": "Erstellt",
"rowCount": "Anzahl der Zeilen",
"freeUsers": "Kostenlose Benutzer",
"seatsTaken": "Sitze besetzt",
"storageUsage": "Verwendeter Speicherplatz (MB)",
"usageHelpText": "Wird nachts berechnet, wenn die Einstellung \"Arbeitsbereichsnutzung verfolgen\" aktiviert ist"
},
"editWorkspaceContext": {
"delete": "Dauerhaft löschen"
},
"deleteWorkspaceModal": {
"title": "Löschen {name}",
"confirmation": "Sind Sie sicher, dass Sie den Arbeitsbereich löschen wollen: {name}?",
"comment": "Der Arbeitsbereich wird dauerhaft gelöscht, einschließlich der zugehörigen Anwendungen. Es ist nicht möglich, diese Aktion rückgängig zu machen.",
"delete": "Arbeitsbereich {name} löschen"
},
"activeUsers": {
"newUsers": "Neuer Benutzer",
"activeUsers": "Aktive Nutzer"
},
"usersAdminTable": {
"allUsers": "Alle Benutzer",
"id": "ID",
"username": "Benutzername",
"name": "Name",
"workspaces": "Arbeitsbereiche",
"lastLogin": "Zuletzt angemeldet",
"dateJoined": "Angemeldet",
"active": "Aktiv"
},
"editUserContext": {
"changePassword": "Passwort ändern",
"delete": "Dauerhaft löschen",
"impersonate": "Imitieren"
},
"changePasswordForm": {
"newPassword": "Neues Passwort",
"repeatPassword": "Passwort wiederholen",
"changePassword": "Passwort ändern",
"error": {
"doesntMatch": "Dieses Feld muss mit Ihrem Passwortfeld übereinstimmen."
}
},
"userForm": {
"fullName": "Vollständiger Name",
"email": "Email",
"isActive": "Ist aktiv",
"warning": {
"changeEmail": "Die Änderung der E-Mail-Adresse des Benutzers bedeutet, dass er sich mit der neuen E-Mail-Adresse anmelden muss, wenn er sich anmeldet. Dies muss dem Benutzer mitgeteilt werden.",
"inactiveUser": "Wenn ein Benutzer als inaktiv markiert ist, kann er sich nicht mehr anmelden.",
"userStaff": "Wenn Sie einen Benutzer zu einem Mitarbeiter machen, erhält dieser Administratorenzugriff auf alle Benutzer und Arbeitsbereiche sowie die Möglichkeit, Ihren eigenen Mitarbeitern die Berechtigungen zu entziehen."
},
"error": {
"invalidName": "Bitte geben Sie einen gültigen vollständigen Namen ein. Er muss länger als 2 Buchstaben und kürzer als 150 sein.",
"invalidEmail": "Bitte geben Sie eine gültige E-Mail Adresse ein."
}
},
"changeUserPasswordModal": {
"changePassword": "Passwort für {Benutzername} ändern"
},
"deleteUserModal": {
"title": "Löschen {username}",
"confirmation": "Sind Sie sicher, dass Sie den Benutzer löschen möchten: {name}?",
"comment1": "Das Benutzerkonto wird gelöscht, aber die Arbeitsbereiche, in denen der Benutzer Mitglied ist, bleiben bestehen. Die Benutzergruppe wird nicht gelöscht, auch wenn dieser Benutzer der letzte Benutzer in dem Arbeitsbereich ist. Durch das Löschen des letzten Benutzers in einem Arbeitsbereich wird verhindert, dass jemand auf diesen Arbeitsbereich zugreifen kann.",
"comment2": "Nach dem Löschen eines Benutzers ist es möglich, dass sich ein neuer Benutzer mit der E-Mail-Adresse des gelöschten Benutzers erneut anmeldet. Um sicherzustellen, dass sie sich nicht erneut anmelden können, deaktivieren Sie den Benutzer und löschen Sie ihn nicht.",
"delete": "Benutzer {username} löschen"
},
"editUserModal": {
"delete": "Benutzer löschen",
"edit": "Bearbeiten { username }"
},
"tableJSONExporter": {
"encoding": "Kodierung"
},
@ -177,22 +91,6 @@
"tryAgain": "Erneut versuchen",
"new": "Neu"
},
"dashboard": {
"title": "Dashboard",
"totals": "Summen",
"totalUsers": "Anzahl der Benutzer",
"totalWorkspaces": "Gesamtzahl der Arbeitsbereiche",
"totalApplications": "Gesamtanzahl der Anträge",
"newUsers": "Neue Benutzer",
"newUsers24h": "Neue Benutzer in den letzten 24 Stunden",
"newUsers7days": "Neue Benutzer in den letzten 7 Tagen",
"newUsers30days": "Neue Benutzer in den letzten 30 Tagen",
"activeUsers": "Aktive Benutzer",
"activeUsers24h": "Aktive Benutzer in den letzten 24 Stunden",
"activeUsers7days": "Aktive Benutzer in den letzten 7 Tagen",
"activeUsers30days": "Aktive Benutzer in den letzten 30 Tagen",
"viewAll": "Alle anzeigen"
},
"licenses": {
"titleNoLicenses": "Keine Lizenzen gefunden",
"titleLicenses": "Lizenzen",

View file

@ -1,15 +1,6 @@
{
"premium": {
"user": {
"isStaff": "Is staff",
"isWorkspaceAdmin": "Is workspace admin",
"active": "Active",
"deactivated": "Deactivated"
},
"adminType": {
"dashboard": "Dashboard",
"users": "Users",
"workspaces": "Workspaces",
"licenses": "Manage licenses"
},
"viewType": {
@ -91,82 +82,6 @@
"registerLicenseForm": {
"licenseKey": "License key"
},
"workspacesAdminTable": {
"allWorkspaces": "All workspaces",
"id": "ID",
"name": "Name",
"members": "Members",
"applications": "Applications",
"created": "Created",
"rowCount": "Row count",
"freeUsers": "Free users",
"seatsTaken": "Seats taken",
"storageUsage": "Storage Used (MB)",
"usageHelpText": "Calculated nightly when the track workspace usage setting is enabled"
},
"editWorkspaceContext": {
"delete": "Permanently delete"
},
"deleteWorkspaceModal": {
"title": "Delete {name}",
"confirmation": "Are you sure you want to delete the workspace: {name}?",
"comment": "The workspace will be permanently deleted, including the related applications. It is not possible to undo this action.",
"delete": "Delete workspace {name}"
},
"activeUsers": {
"newUsers": "New users",
"activeUsers": "Active users"
},
"usersAdminTable": {
"allUsers": "All users",
"username": "Username",
"name": "Name",
"workspaces": "Workspaces",
"lastLogin": "Last login",
"dateJoined": "Signed up",
"active": "Active"
},
"editUserContext": {
"changePassword": "Change password",
"delete": "Permanently delete",
"impersonate": "Impersonate"
},
"changePasswordForm": {
"newPassword": "New password",
"repeatPassword": "Repeat password",
"changePassword": "Change password",
"error": {
"doesntMatch": "This field must match your password field."
}
},
"userForm": {
"fullName": "Full name",
"email": "Email",
"isActive": "Is active",
"warning": {
"changeEmail": "Changing this users email address means when they sign in they must use the new email address to do so. This must be communicated with that user.",
"inactiveUser": "When a user is marked as inactive they are prevented from signing in.",
"userStaff": "Making the user staff gives them admin access to all users, all workspaces and the ability to revoke your own staff permissions."
},
"error": {
"invalidName": "Please enter a valid full name, it must be longer than 2 letters and less than 150.",
"invalidEmail": "Please enter a valid e-mail address."
}
},
"changeUserPasswordModal": {
"changePassword": "Change password for {username}"
},
"deleteUserModal": {
"title": "Delete {username}",
"confirmation": "Are you sure you want to delete the user: {name}?",
"comment1": "The user account will be deleted, however the workspaces that user is a member of will continue existing. The users workspace will not be deleted, even if this user is the last user in the workspace. Deleting the last user in a workspace prevents anyone being able to access that workspace.",
"comment2": "After deleting a user it is possible for a new user to sign up again using the deleted users email address. To ensure they cannot sign up again instead deactivate the user and do not delete them.",
"delete": "Delete user {username}"
},
"editUserModal": {
"delete": "Delete user",
"edit": "Edit { username }"
},
"tableJSONExporter": {
"encoding": "Encoding"
},
@ -253,29 +168,12 @@
"timelineGridRow": {
"days": "0 | 1 day | {count} days"
},
"dashboard": {
"title": "Dashboard",
"totals": "Totals",
"totalUsers": "Total users",
"totalWorkspaces": "Total workspaces",
"totalApplications": "Total applications",
"newUsers": "New users",
"newUsers24h": "New users last 24 hours",
"newUsers7days": "New users last 7 days",
"newUsers30days": "New users last 30 days",
"activeUsers": "Active users",
"activeUsers24h": "Active users last 24 hours",
"activeUsers7days": "Active users last 7 days",
"activeUsers30days": "Active users last 30 days",
"viewAll": "View all"
},
"premiumFeatures": {
"rowComments": "Row comments",
"kanbanView": "Kanban view",
"calendarView": "Calendar view",
"timelineView": "Timeline view",
"exports": "JSON and XML export",
"admin": "Admin functionality",
"rowColoring": "Row coloring",
"surveyForm": "Survey form",
"publicLogoRemoval": "Public logo removal",

View file

@ -1,15 +1,6 @@
{
"premium": {
"user": {
"isStaff": "Es staff",
"isWorkspaceAdmin": "Es administrador de grupo",
"active": "Activo",
"deactivated": "Desactivado"
},
"adminType": {
"dashboard": "Tablero",
"users": "Usuarios",
"workspaces": "Grupos",
"licenses": "Gestionar licencias"
},
"viewType": {
@ -70,83 +61,6 @@
"registerLicenseForm": {
"licenseKey": "Clave de licencia"
},
"workspacesAdminTable": {
"allWorkspaces": "Todos los grupos",
"id": "ID",
"name": "Nombre",
"members": "Miembros",
"applications": "Aplicaciones",
"created": "Creado",
"seatsTaken": "Asientos ocupados",
"storageUsage": "Almacenamiento utilizado (MB)",
"usageHelpText": "Calculado por la noche cuando la configuración de uso grupal está habilitada",
"rowCount": "Recuento de filas",
"freeUsers": "Usuarios gratuitos"
},
"editWorkspaceContext": {
"delete": "Eliminado permanentemente"
},
"deleteWorkspaceModal": {
"title": "Eliminar {name}",
"confirmation": "¿Está seguro de que desea eliminar el grupo: {name}?",
"comment": "El grupo se eliminará de forma permanente, incluidas las aplicaciones relacionadas. No es posible deshacer esta acción.",
"delete": "Eliminar grupo {name}"
},
"activeUsers": {
"newUsers": "Nuevos usuarios",
"activeUsers": "Usuarios activos"
},
"usersAdminTable": {
"allUsers": "Todos los usuarios",
"id": "id",
"username": "Nombre de usuario",
"name": "Nombre",
"workspaces": "Grupos",
"lastLogin": "Último acceso",
"dateJoined": "Inscrito",
"active": "Activo"
},
"editUserContext": {
"changePassword": "Cambiar la contraseña",
"delete": "Borrar permanentemente",
"impersonate": "Suplantar"
},
"changePasswordForm": {
"newPassword": "Nueva contraseña",
"repeatPassword": "Repetir contraseña",
"changePassword": "Cambiar contraseña",
"error": {
"doesntMatch": "Este campo debe coincidir con su campo de contraseña."
}
},
"userForm": {
"fullName": "Nombre completo",
"email": "Email",
"isActive": "Está activo",
"warning": {
"changeEmail": "Cambiar la dirección de correo electrónico de este usuario significa que cuando inician sesión deben usar la nueva dirección de correo electrónico para hacerlo. Esto debe ser comunicado con ese usuario.",
"inactiveUser": "Cuando un usuario se marca como inactivo, no puede iniciar sesión.",
"userStaff": "Convertir al usuario en personal le da acceso de administrador a todos los usuarios, todos los espacios de trabajo, y la capacidad de revocar tus propios permisos de personal."
},
"error": {
"invalidName": "Ingrese un nombre completo válido, debe tener más de 2 letras y menos de 150.",
"invalidEmail": "Por favor, introduce una dirección de correo electrónico válida."
}
},
"changeUserPasswordModal": {
"changePassword": "Cambiar contraseña para {username}"
},
"deleteUserModal": {
"title": "Eliminar {username}",
"confirmation": "¿Está seguro de que desea eliminar el usuario: {name}?",
"comment1": "La cuenta de usuario se eliminará, pero los espacios de trabajo de los que el usuario es miembro seguirán existiendo. El espacio de trabajo del usuario no se eliminará, incluso si este usuario es el último usuario en el espacio de trabajo. Si se elimina el último usuario de un espacio de trabajo, nadie podrá acceder a ese espacio de trabajo.",
"comment2": "Después de eliminar un usuario, es posible que un nuevo usuario se registre nuevamente utilizando la dirección de correo electrónico de los usuarios eliminados. Para asegurarse de que no puedan volver a registrarse, desactive al usuario y no lo elimine.",
"delete": "Eliminar usuario {username}"
},
"editUserModal": {
"delete": "Eliminar usuario",
"edit": "Editar {username}"
},
"tableJSONExporter": {
"encoding": "Codificación"
},
@ -178,22 +92,6 @@
"tryAgain": "Intentar otra vez",
"new": "Nuevo"
},
"dashboard": {
"title": "Tablero",
"totals": "Totales",
"totalUsers": "Usuarios totales",
"totalWorkspaces": "Grupos totales",
"totalApplications": "Aplicaciones totales",
"newUsers": "Nuevos usuarios",
"newUsers24h": "Nuevos usuarios últimas 24 horas",
"newUsers7days": "Nuevos usuarios últimos 7 días",
"newUsers30days": "Nuevos usuarios últimos 30 días",
"activeUsers": "Usuarios activos",
"activeUsers24h": "Usuarios activos últimas 24 horas",
"activeUsers7days": "Usuarios activos últimos 7 días",
"activeUsers30days": "Usuarios activos últimos 30 días",
"viewAll": "Ver todo"
},
"licenses": {
"titleNoLicenses": "No se encontraron licencias",
"titleLicenses": "Licencias",

View file

@ -1,17 +1,5 @@
{
"premium": {
"user": {
"isStaff": "Est collaborateur",
"isWorkspaceAdmin": "Est l'administrateur du projet",
"active": "Actif",
"deactivated": "Inactif"
},
"adminType": {
"dashboard": "Statistiques",
"users": "Utilisateurs",
"workspaces": "Projets",
"licenses": "Gérer les licences"
},
"viewType": {
"kanban": "Kanban",
"calendar": "Calendrier",
@ -70,83 +58,6 @@
"registerLicenseForm": {
"licenseKey": "Clé de licence"
},
"workspacesAdminTable": {
"allWorkspaces": "Liste des projets",
"id": "ID",
"name": "Nom",
"members": "Membres",
"applications": "Applications",
"created": "Créé le",
"seatsTaken": "Places occupées",
"storageUsage": "Stockage utilisé (Mo)",
"rowCount": "Nombre de lignes",
"freeUsers": "Utilisateurs gratuits",
"usageHelpText": "Calculé chaque nuit lorsque le paramètre de suivi de l'utilisation des projets est activé"
},
"editWorkspaceContext": {
"delete": "Supprimer définitivement"
},
"deleteWorkspaceModal": {
"title": "Supprimer {name}",
"confirmation": "Êtes-vous sûr·e de vouloir supprimer le projet : {name} ?",
"comment": "Le projet va être supprimé définitivement ainsi que ses applications liées. Il est impossible d'annuler cette action.",
"delete": "Supprimer le projet {name}"
},
"activeUsers": {
"newUsers": "Nouveaux utilisateurs",
"activeUsers": "Utilisateurs actifs"
},
"usersAdminTable": {
"allUsers": "Liste des utilisateurs",
"id": "ID",
"username": "Identifiant",
"name": "Nom",
"workspaces": "Projets",
"lastLogin": "Dernière connexion",
"dateJoined": "Date d'inscription",
"active": "Actif"
},
"editUserContext": {
"changePassword": "Modifier le mot de passe",
"delete": "Supprimer définitivement",
"impersonate": "Usurper"
},
"changePasswordForm": {
"newPassword": "Nouveau mot de passe",
"repeatPassword": "Répétez le mot de passe",
"changePassword": "Mettre à jour le mot de passe",
"error": {
"doesntMatch": "Les deux mots de passe ne correspondent pas."
}
},
"userForm": {
"fullName": "Nom complet",
"email": "Adresse électronique",
"isActive": "Est actif",
"warning": {
"changeEmail": "Si vous changez l'adresse électronique, l'utilisateur devra désormais utiliser celle-ci pour s'identifier. Ceci doit être signifié à l'utilisateur.",
"inactiveUser": "Un utilisateur inactif n'est plus en mesure de s'identifier.",
"userStaff": "Un collaborateur a accès à la liste des utilisateurs, des projets et peut changer les permissions de tous les utilisateurs."
},
"error": {
"invalidName": "Veuillez saisir un nom valide, il doit être composé de plus de 2 caractères et moins de 150.",
"invalidEmail": "Veuillez saisir une adresse électronique valide."
}
},
"changeUserPasswordModal": {
"changePassword": "Changer le mot de passe pour {username}"
},
"deleteUserModal": {
"title": "Supprimer {username}",
"confirmation": "Êtes-vous sûr·e de vouloir supprimer l'utilisateur : {name} ?",
"comment1": "Le compte de l'utilisateur va être supprimé, cependant les projets dont l'utilisateur est membre vont continuer d'exister. Ces projets ne seront pas supprimés même si cet utilisateur est le dernier utilisateur du projet. Supprimer le dernier utilisateur d'un projet interdit à quiconque d'y accéder de nouveau.",
"comment2": "Après avoir supprimé un utilisateur, il sera possible de créer un nouveau compte avec la même adresse email. Si vous souhaitez éviter que l'utilisateur puisse se connecter avec cette adresse, vous pouvez désactiver l'utilisateur plutôt que supprimer son compte.",
"delete": "Supprimer l'utilisateur {username}"
},
"editUserModal": {
"delete": "Supprimer l'utilisateur",
"edit": "Modifier {username}"
},
"tableJSONExporter": {
"encoding": "Encodage"
},
@ -177,22 +88,6 @@
"tryAgain": "Essayer encore",
"new": "Nouveau"
},
"dashboard": {
"title": "Statistiques",
"totals": "Résumé",
"totalUsers": "Nombre d'utilisateur",
"totalWorkspaces": "Nombre de projet",
"totalApplications": "Nombre d'application",
"newUsers": "Nouveaux utilisateurs",
"newUsers24h": "Sur les dernières 24h",
"newUsers7days": "sur les 7 derniers jours",
"newUsers30days": "Sur les 30 derniers jours",
"activeUsers": "Utilisateurs actifs",
"activeUsers24h": "Sur les dernières 24h",
"activeUsers7days": "sur les 7 derniers jours",
"activeUsers30days": "Sur les 30 derniers jours",
"viewAll": "Consulter"
},
"licenses": {
"titleNoLicenses": "Aucune licences trouvée",
"titleLicenses": "Licences",

View file

@ -1,15 +1,6 @@
{
"premium": {
"user": {
"isStaff": "È staff",
"isWorkspaceAdmin": "È amministratore del progetto",
"active": "Attivo",
"deactivated": "Disattivato"
},
"adminType": {
"dashboard": "Dashboard",
"users": "Utenti",
"workspaces": "Progetti",
"licenses": "Gestisci le licenze"
},
"viewType": {
@ -70,83 +61,6 @@
"registerLicenseForm": {
"licenseKey": "Chiave di licenza"
},
"workspacesAdminTable": {
"allWorkspaces": "Tutti i progetti",
"id": "ID",
"name": "Nome",
"members": "Membri",
"applications": "Applicazioni",
"created": "Creato",
"freeUsers": "Utenti gratuiti",
"usageHelpText": "Calcolato ogni notte se l'impostazione è attiva",
"seatsTaken": "Licenze assegnate",
"rowCount": "Numero di righe",
"storageUsage": "Spazio disco utilizzato (MB)"
},
"editWorkspaceContext": {
"delete": "Eliminato in modo permanente"
},
"deleteWorkspaceModal": {
"title": "Elimina {name}",
"confirmation": "Sei sicuro di voler eliminare il progetto: {name}?",
"comment": "Il progetto verrà eliminato in modo permanente, così come tutte le applicazioni associate. Non è possibile annullare questa azione.",
"delete": "Elimina progetto {name}"
},
"activeUsers": {
"newUsers": "Nuovi utenti",
"activeUsers": "Utenti attivi"
},
"usersAdminTable": {
"allUsers": "Tutti gli utenti",
"id": "ID",
"username": "Nome utente",
"name": "Nome",
"workspaces": "Progetti",
"lastLogin": "Ultimo accesso",
"dateJoined": "Registrato",
"active": "Attivo"
},
"editUserContext": {
"changePassword": "Modifica password",
"delete": "Eliminato in modo permanente",
"impersonate": "Impersona"
},
"changePasswordForm": {
"newPassword": "Nuova password",
"repeatPassword": "Ripeti la password",
"changePassword": "Modifica la password",
"error": {
"doesntMatch": "Questo campo deve corrispondere al campo password."
}
},
"userForm": {
"fullName": "Nome completo",
"email": "E-mail",
"isActive": "È attivo",
"warning": {
"changeEmail": "Questo è l'indirizzo che l'utente dovrà utilizzare per la registrazione. Se lo modifichi, assicurati di comunicarlo alla persone interessata.",
"inactiveUser": "Quando un utente è contrassegnato come non attivo non potrà più effettuare l'accesso.",
"userStaff": "I permessi di staff danno al personale l'accesso come amministratore a tutti gli utenti e a tutti i progetti."
},
"error": {
"invalidName": "Inserisci un nome completo valido, deve essere più lungo di 2 lettere e meno di 150.",
"invalidEmail": "Inserisci un indirizzo e-mail valido."
}
},
"changeUserPasswordModal": {
"changePassword": "Modifica password per {username}"
},
"deleteUserModal": {
"title": "Elimina {username}",
"confirmation": "Sei sicuro di voler eliminare l'utente: {name}?",
"comment1": "L'account sarà eliminato. Tuttavia, i progetti di cui l'utente è membro continueranno a esistere. L'eliminazione dell'ultimo utente del progetto impedirà a chiunque di accedere a quel progetto.",
"comment2": "L'utente eliminato potrà nuovamente iscriversi utilizzando la stessa email. Per assicurarti di impedire una nuova iscrizione, disattiva l'utente anziché eliminarlo.",
"delete": "Elimina utente {username}"
},
"editUserModal": {
"delete": "Elimina utente",
"edit": "Modifica {username}"
},
"tableJSONExporter": {
"encoding": "Codifica"
},
@ -178,22 +92,6 @@
"tryAgain": "Prova di nuovo",
"new": "Nuovo"
},
"dashboard": {
"title": "Dashboard",
"totals": "Totali",
"totalUsers": "Totale utenti",
"totalWorkspaces": "Totale progetti",
"totalApplications": "Totale applicazioni",
"newUsers": "Nuovi utenti",
"newUsers24h": "Nuovi utenti nelle ultime 24 ore",
"newUsers7days": "Nuovi utenti nelle ultimi 7 giorni",
"newUsers30days": "Nuovi utenti nelle ultimi 30 giorni",
"activeUsers": "Utenti attivi",
"activeUsers24h": "Utenti attivi nelle ultime 24 ore",
"activeUsers7days": "Utenti attivi nelle ultimi 7 giorni",
"activeUsers30days": "Utenti attivi nelle ultimi 30 giorni",
"viewAll": "Vedi tutti"
},
"licenses": {
"titleNoLicenses": "Nessuna licenza",
"titleLicenses": "Licenze",

View file

@ -1,15 +1,6 @@
{
"premium": {
"user": {
"isStaff": "はスタッフです",
"isWorkspaceAdmin": "はグループ管理者です",
"active": "有効",
"deactivated": "無効"
},
"adminType": {
"dashboard": "ダッシュボード",
"users": "ユーザー",
"workspaces": "グループ",
"licenses": "ライセンス"
},
"viewType": {
@ -63,77 +54,6 @@
"registerLicenseForm": {
"licenseKey": "ライセンスキー"
},
"workspacesAdminTable": {
"allWorkspaces": "全グループ",
"id": "ID",
"name": "名前",
"members": "メンバー",
"applications": "アプリケーション",
"created": "作成されました"
},
"editWorkspaceContext": {
"delete": "完全に削除"
},
"deleteWorkspaceModal": {
"title": "{name} を削除",
"confirmation": "本当にグループ「 {name} 」を削除しますか?",
"comment": "グループは完全に削除され、関連するアプリケーションも削除されます。この処理はやり直し出来ません。",
"delete": "グループ「 {name} 」を削除"
},
"activeUsers": {
"newUsers": "新規ユーザー",
"activeUsers": "有効なユーザー"
},
"usersAdminTable": {
"allUsers": "全ユーザー",
"username": "ユーザー名",
"name": "名前",
"workspaces": "グループ",
"lastLogin": "最後のログイン",
"dateJoined": "登録",
"active": "有効"
},
"editUserContext": {
"changePassword": "パスワード変更",
"delete": "完全に削除",
"impersonate": "インパーソネート"
},
"changePasswordForm": {
"newPassword": "新しいパスワード",
"repeatPassword": "パスワード再入力",
"changePassword": "パスワード変更",
"error": {
"doesntMatch": "入力されたパスワードと一致しません。"
}
},
"userForm": {
"fullName": "氏名",
"email": "Eメール",
"isActive": "は有効です",
"warning": {
"changeEmail": "Eメールを変更すると、ログインも新しいEメールで行う必要があります。ユーザーへ必ず伝えて下さい。",
"inactiveUser": "無効なユーザーはログイン出来ません。",
"userStaff": "スタッフ権限を持つユーザーは管理者としてすべてのユーザー、グループにアクセスできて、他ユーザーのスタッフ権限を無効にすることも出来ます。"
},
"error": {
"invalidName": "正しい氏名を 2 文字以上、 150 文字以内で入力して下さい。",
"invalidEmail": "正しいEメールアドレスを入力して下さい。"
}
},
"changeUserPasswordModal": {
"changePassword": "{username} のパスワードを変更する"
},
"deleteUserModal": {
"title": "{username} を削除",
"confirmation": "本当にユーザー「 {name} 」を削除しますか?",
"comment1": "このユーザーアカウントは削除されますが、グループは残ります。最後のユーザーを削除しても、グループは残りますが、誰もそのグループにアクセス出来なくなります。",
"comment2": "削除されたユーザーのEメールを使って新しいユーザーを作成することは可能です。削除ではなくユーザーを無効にすることで、同じEメールでのユーザーの作成を防ぐことが出来ます。",
"delete": "{username} を削除"
},
"editUserModal": {
"delete": "ユーザー削除",
"edit": "{username} を編集"
},
"tableJSONExporter": {
"encoding": "エンコーディング"
},
@ -164,22 +84,6 @@
"tryAgain": "もう一度やって下さい",
"new": "新規"
},
"dashboard": {
"title": "ダッシュボード",
"totals": "合計",
"totalUsers": "ユーザー全数",
"totalWorkspaces": "グループ全数",
"totalApplications": "アプリケーション全数",
"newUsers": "新しいユーザー",
"newUsers24h": "24時間以内に作成されたユーザー",
"newUsers7days": "7 日以内に作成されたユーザー",
"newUsers30days": "30 日以内に作成されたユーザー",
"activeUsers": "有効なユーザー",
"activeUsers24h": "24時間以内の有効なユーザー",
"activeUsers7days": "7日以内の有効なユーザー",
"activeUsers30days": "30日以内の有効なユーザー",
"viewAll": "すべて表示"
},
"premiumFeatures": {
"rowComments": "行コメント",
"kanbanView": "カンバン・ビュー",

View file

@ -1,15 +1,6 @@
{
"premium": {
"user": {
"isStaff": "직원 여부",
"isWorkspaceAdmin": "워크스페이스 관리자 여부",
"active": "활성",
"deactivated": "비활성화됨"
},
"adminType": {
"dashboard": "대시보드",
"users": "사용자",
"workspaces": "워크스페이스",
"licenses": "라이선스 관리"
},
"viewType": {
@ -90,82 +81,6 @@
"registerLicenseForm": {
"licenseKey": "라이선스 키"
},
"workspacesAdminTable": {
"allWorkspaces": "모든 워크스페이스",
"id": "ID",
"name": "이름",
"members": "멤버",
"applications": "애플리케이션",
"created": "생성됨",
"rowCount": "행 수",
"freeUsers": "무료 사용자",
"seatsTaken": "사용된 좌석",
"storageUsage": "사용된 저장소 (MB)",
"usageHelpText": "워크스페이스 사용 추적 설정이 활성화된 경우 매일 밤 계산됩니다"
},
"editWorkspaceContext": {
"delete": "영구 삭제"
},
"deleteWorkspaceModal": {
"title": "{name} 삭제",
"confirmation": "워크스페이스 {name}을(를) 삭제하시겠습니까?",
"comment": "워크스페이스는 관련된 애플리케이션과 함께 영구적으로 삭제됩니다. 이 작업은 되돌릴 수 없습니다.",
"delete": "워크스페이스 {name} 삭제"
},
"activeUsers": {
"newUsers": "신규 사용자",
"activeUsers": "활성 사용자"
},
"usersAdminTable": {
"allUsers": "모든 사용자",
"username": "사용자 이름",
"name": "이름",
"workspaces": "워크스페이스",
"lastLogin": "마지막 로그인",
"dateJoined": "가입일",
"active": "활성"
},
"editUserContext": {
"changePassword": "비밀번호 변경",
"delete": "영구 삭제",
"impersonate": "사용자 가장"
},
"changePasswordForm": {
"newPassword": "새 비밀번호",
"repeatPassword": "비밀번호 재입력",
"changePassword": "비밀번호 변경",
"error": {
"doesntMatch": "이 필드는 비밀번호 필드와 일치해야 합니다."
}
},
"userForm": {
"fullName": "전체 이름",
"email": "이메일",
"isActive": "활성 여부",
"warning": {
"changeEmail": "이 사용자의 이메일 주소를 변경하면 로그인 시 새 이메일 주소를 사용해야 합니다. 이는 해당 사용자에게 전달되어야 합니다.",
"inactiveUser": "사용자가 비활성화되면 로그인할 수 없습니다.",
"userStaff": "사용자를 직원으로 지정하면 모든 사용자와 워크스페이스에 대한 관리자 액세스 권한이 부여되며, 본인의 직원 권한을 철회할 수 있습니다."
},
"error": {
"invalidName": "유효한 전체 이름을 입력하세요. 2자 이상 150자 이하여야 합니다.",
"invalidEmail": "유효한 이메일 주소를 입력하세요."
}
},
"changeUserPasswordModal": {
"changePassword": "{username}의 비밀번호 변경"
},
"deleteUserModal": {
"title": "{username} 삭제",
"confirmation": "사용자 {name}을(를) 삭제하시겠습니까?",
"comment1": "사용자 계정은 삭제되지만, 해당 사용자가 속한 워크스페이스는 계속 존재합니다. 해당 사용자가 워크스페이스의 마지막 사용자이더라도 사용자의 워크스페이스는 삭제되지 않습니다. 워크스페이스의 마지막 사용자를 삭제하면 해당 워크스페이스에 아무도 접근할 수 없게 됩니다.",
"comment2": "사용자를 삭제한 후 삭제된 사용자의 이메일 주소를 사용하여 새 사용자가 다시 가입할 수 있습니다. 다시 가입하지 못하도록 하려면 사용자를 삭제하지 않고 비활성화하세요.",
"delete": "사용자 {username} 삭제"
},
"editUserModal": {
"delete": "사용자 삭제",
"edit": "{username} 편집"
},
"tableJSONExporter": {
"encoding": "인코딩"
},
@ -249,22 +164,6 @@
"timelineGridRow": {
"days": "0 | 1일 | {count}일"
},
"dashboard": {
"title": "대시보드",
"totals": "합계",
"totalUsers": "전체 사용자",
"totalWorkspaces": "전체 워크스페이스",
"totalApplications": "전체 애플리케이션",
"newUsers": "신규 사용자",
"newUsers24h": "지난 24시간 동안 신규 사용자",
"newUsers7days": "지난 7일 동안 신규 사용자",
"newUsers30days": "지난 30일 동안 신규 사용자",
"activeUsers": "활성 사용자",
"activeUsers24h": "지난 24시간 동안 활성 사용자",
"activeUsers7days": "지난 7일 동안 활성 사용자",
"activeUsers30days": "지난 30일 동안 활성 사용자",
"viewAll": "모두 보기"
},
"premiumFeatures": {
"rowComments": "행 댓글",
"kanbanView": "칸반 뷰",

View file

@ -1,15 +1,6 @@
{
"premium": {
"user": {
"isStaff": "Is personeel",
"isWorkspaceAdmin": "Is werkruimte beheerder",
"active": "Ingeschakeld",
"deactivated": "Uitgeschakeld"
},
"adminType": {
"dashboard": "Dashboard",
"users": "Gebruikers",
"workspaces": "Werkruimtes",
"licenses": "Licenties"
},
"viewType": {
@ -70,83 +61,6 @@
"registerLicenseForm": {
"licenseKey": "Licentiesleutel"
},
"workspacesAdminTable": {
"allWorkspaces": "Alle werkruimtes",
"id": "ID",
"name": "Naam",
"members": "Leden",
"applications": "Applicaties",
"created": "Aangemaakt",
"seatsTaken": "Plekken bezet",
"usageHelpText": "Wordt 's nachts berekend wanneer de instelling voor het gebruik van werkruimtes is ingeschakeld",
"rowCount": "Aantal rijen",
"freeUsers": "Gratis gebruikers",
"storageUsage": "Opslag gebruikt (MB)"
},
"editWorkspaceContext": {
"delete": "Permanent verwijderen"
},
"deleteWorkspaceModal": {
"title": "Verwijder {name}",
"confirmation": "Weet je zeker dat je de werkruimte: {name} wilt verwijderen?",
"comment": "De werkruimte wordt permanent verwijderd, inclusief de bijbehorende applicaties. Het is niet mogelijk deze actie ongedaan te maken.",
"delete": "Werkruimte {name} verwijderen"
},
"activeUsers": {
"newUsers": "Nieuwe gebruikers",
"activeUsers": "Actieve gebruikers"
},
"usersAdminTable": {
"allUsers": "Alle gebruikers",
"id": "ID",
"username": "Gebruikersnaam",
"name": "Naam",
"workspaces": "Werkruimtes",
"lastLogin": "Laatste login",
"dateJoined": "Ingeschreven",
"active": "Ingeschakeld"
},
"editUserContext": {
"changePassword": "Wachtwoord wijzigen",
"delete": "Permanent verwijderen",
"impersonate": "Imiteer"
},
"changePasswordForm": {
"newPassword": "Nieuw wachtwoord",
"repeatPassword": "Herhaal wachtwoord",
"changePassword": "Wachtwoord wijzigen",
"error": {
"doesntMatch": "Dit veld moet overeenkomen met je wachtwoordveld."
}
},
"userForm": {
"fullName": "Volledige naam",
"email": "E-mail",
"isActive": "Is actief",
"warning": {
"changeEmail": "Als het e-mailadres van deze gebruiker wordt gewijzigd, moet hij/zij dit nieuwe e-mailadres gebruiken wanneer hij/zij zich aanmeldt. Dit moet aan de gebruiker worden gecommuniceerd.",
"inactiveUser": "Wanneer een gebruiker als inactief wordt gemarkeerd, kan deze zich niet meer aanmelden.",
"userStaff": "Door de gebruiker personeel te maken, krijgt deze beheerderstoegang tot alle gebruikers en alle werkruimtes, met de mogelijkheid om de eigen personeelsrechten in te trekken."
},
"error": {
"invalidName": "Voer een geldige volledige naam in. De naam moet langer zijn dan 2 letters en minder dan 150.",
"invalidEmail": "Voer een geldig e-mail adres in."
}
},
"changeUserPasswordModal": {
"changePassword": "Wijzig wachtwoord voor {gebruikersnaam}"
},
"deleteUserModal": {
"title": "Verwijder {gebruikersnaam}",
"confirmation": "Weet je zeker dat je de gebruiker: {name} wilt verwijderen?",
"comment1": "De gebruikersaccount wordt verwijderd, maar de werkruimtes waar die gebruiker lid van is blijven bestaan. De gebruikers werkruimte wordt niet verwijderd, zelfs als deze gebruiker de laatste gebruiker in de werkruimtes is. Door de laatste gebruiker in een werkruimte te verwijderen kan niemand meer toegang krijgen tot die werkruimte.",
"comment2": "Na het verwijderen van een gebruiker is het mogelijk dat een nieuwe gebruiker zich opnieuw aanmeldt met het e-mailadres van de verwijderde gebruiker. Om ervoor te zorgen dat ze zich niet opnieuw kunnen aanmelden, deactiveer de gebruiker in plaats van deze te verwijderen.",
"delete": "Verwijder gebruiker {gebruikersnaam}"
},
"editUserModal": {
"delete": "Gebruiker verwijderen",
"edit": "Bewerk { gebruikersnaam }"
},
"tableJSONExporter": {
"encoding": "Codering"
},
@ -177,22 +91,6 @@
"tryAgain": "Probeer het nog eens",
"new": "Nieuw"
},
"dashboard": {
"title": "Dashboard",
"totals": "Totalen",
"totalUsers": "Totaal gebruikers",
"totalWorkspaces": "Totaal werkruimte",
"totalApplications": "Totaal aanvragen",
"newUsers": "Nieuwe gebruikers",
"newUsers24h": "Nieuwe gebruikers laatste 24 uur",
"newUsers7days": "Nieuwe gebruikers laatste 7 dagen",
"newUsers30days": "Nieuwe gebruikers laatste 30 dagen",
"activeUsers": "Actieve gebruikers",
"activeUsers24h": "Actieve gebruikers laatste 24 uur",
"activeUsers7days": "Actieve gebruikers laatste 7 dagen",
"activeUsers30days": "Actieve gebruikers laatste 30 dagen",
"viewAll": "Alles bekijken"
},
"licenses": {
"titleNoLicenses": "Geen licenties gevonden",
"titleLicenses": "Licenties",

View file

@ -1,15 +1,6 @@
{
"premium": {
"user": {
"isStaff": "Personel",
"isWorkspaceAdmin": "Jest administratorem grupy",
"active": "Aktywny",
"deactivated": "Dezaktywowany"
},
"adminType": {
"dashboard": "Dashboard",
"users": "Użytkownicy",
"workspaces": "Grupy",
"licenses": "Zarządzaj licencjami"
},
"viewType": {
@ -74,83 +65,6 @@
"registerLicenseForm": {
"licenseKey": "Klucz licencyjny"
},
"workspacesAdminTable": {
"allWorkspaces": "Wszystkie grupy",
"id": "ID",
"name": "Nazwa",
"members": "Członkowie",
"applications": "Aplikacje",
"created": "Utworzony",
"seatsTaken": "Zajęte miejsca",
"storageUsage": "Wykorzystana pamięć (MB)",
"freeUsers": "Bezpłatni użytkownicy",
"rowCount": "Liczba wierszy",
"usageHelpText": "Obliczane co noc, gdy włączone jest ustawienie śledzenia wykorzystania grupy"
},
"editWorkspaceContext": {
"delete": "Usunąć na stałe"
},
"deleteWorkspaceModal": {
"title": "Usuń {name}",
"confirmation": "Czy na pewno chcesz usunąć grupę: {name}?",
"comment": "Grupa zostanie trwale usunięta, wraz z powiązanymi z nią aplikacjami. Nie ma możliwości cofnięcia tej akcji.",
"delete": "Usuń grupę {name}"
},
"activeUsers": {
"newUsers": "Nowi użytkownicy",
"activeUsers": "Aktywni użytkownicy"
},
"usersAdminTable": {
"allUsers": "Wszystkich użytkowników",
"id": "ID",
"username": "Nazwa użytkownika",
"name": "Nazwa",
"workspaces": "Grupy",
"lastLogin": "Ostatnie logowanie",
"dateJoined": "Zapisany",
"active": "Aktywny"
},
"editUserContext": {
"changePassword": "Zmiana hasła",
"delete": "Trwałe usuwanie",
"impersonate": "Podszywać się pod"
},
"changePasswordForm": {
"newPassword": "Nowe hasło",
"repeatPassword": "Powtórz hasło",
"changePassword": "Zmień hasło",
"error": {
"doesntMatch": "To pole musi być zgodne z Twoim hasłem."
}
},
"userForm": {
"fullName": "Pełne imię i nazwisko",
"email": "E-mail",
"isActive": "Jest aktywny",
"warning": {
"changeEmail": "Zmiana adresu e-mail użytkownika oznacza, że kiedy zaloguje się on do systemu, będzie musiał użyć nowego adresu e-mail. Musi to zostać zakomunikowane temu użytkownikowi.",
"inactiveUser": "Kiedy użytkownik jest oznaczony jako nieaktywny, nie może się zalogować.",
"userStaff": "Nadanie użytkownikowi statusu pracownika daje mu dostęp administratora do wszystkich użytkowników, wszystkich obszarów roboczych i możliwość odebrania uprawnień pracownikom."
},
"error": {
"invalidName": "Podaj prawidłowe imię i nazwisko, musi mieć więcej niż 2 litery i mniej niż 150.",
"invalidEmail": "Proszę wpisać prawidłowy adres e-mail."
}
},
"changeUserPasswordModal": {
"changePassword": "Zmień hasło dla {username}"
},
"deleteUserModal": {
"title": "Usuń {username}",
"confirmation": "Czy na pewno chcesz usunąć użytkownika: {name}?",
"comment1": "Konto użytkownika zostanie usunięte, jednak obszary robocze, których użytkownik jest członkiem, będą nadal istnieć. Obszar roboczy użytkownika nie zostanie usunięty, nawet jeśli ten użytkownik jest ostatnim użytkownikiem w obszarze roboczym. Usunięcie ostatniego użytkownika w obszarze roboczym uniemożliwia każdemu dostęp do tego obszaru roboczego.",
"comment2": "Po usunięciu użytkownika możliwe jest, że nowy użytkownik zarejestruje się ponownie używając adresu e-mail usuniętego użytkownika. Aby uniemożliwić im ponowne zarejestrowanie się, należy dezaktywować użytkownika i nie usuwać go.",
"delete": "Usuń użytkownika {username}"
},
"editUserModal": {
"delete": "Usuń użytkownika",
"edit": "Edytuj { username }"
},
"tableJSONExporter": {
"encoding": "Kodowanie"
},
@ -181,22 +95,6 @@
"tryAgain": "Spróbuj ponownie",
"new": "Nowy"
},
"dashboard": {
"title": "Pulpit",
"totals": "Ogółem",
"totalUsers": "Użytkownicy ogółem",
"totalWorkspaces": "Grupy ogółem",
"totalApplications": "Aplikacje ogółem",
"newUsers": "Nowi użytkownicy",
"newUsers24h": "Nowi użytkownicy w ciągu ostatnich 24 godzin",
"newUsers7days": "Nowi użytkownicy w ciągu ostatnich 7 dni",
"newUsers30days": "Nowi użytkownicy w ciągu ostatnich 30 dni",
"activeUsers": "Aktywni użytkownicy",
"activeUsers24h": "Aktywni użytkownicy w ciągu ostatnich 24 godzin",
"activeUsers7days": "Aktywni użytkownicy w ciągu ostatnich 7 dni",
"activeUsers30days": "Aktywni użytkownicy w ciągu ostatnich 30 dni",
"viewAll": "Zobacz wszystkie"
},
"premiumFeatures": {
"rowComments": "Komentarze do wierszy",
"kanbanView": "Widok kanban",

View file

@ -1,15 +1,6 @@
{
"premium": {
"user": {
"isStaff": "É staff",
"isWorkspaceAdmin": "É administrador do grupo",
"active": "Ativo",
"deactivated": "Desativado"
},
"adminType": {
"dashboard": "Painel",
"users": "Usuários",
"workspaces": "Grupos",
"licenses": "Licenças"
},
"viewType": {
@ -54,77 +45,6 @@
"registerLicenseForm": {
"licenseKey": "Chave de licença"
},
"workspacesAdminTable": {
"allWorkspaces": "Todos grupos",
"id": "ID",
"name": "Nome",
"members": "Membros",
"applications": "Aplicações",
"created": "Criado"
},
"editWorkspaceContext": {
"delete": "Excluído permanentemente"
},
"deleteWorkspaceModal": {
"title": "Deletar {name}",
"confirmation": "Tem certeza de que deseja excluir o grupo: {name}?",
"comment": "O grupo será excluído permanentemente, incluindo os aplicativos relacionados. Não é possível desfazer esta ação.",
"delete": "Deletar grupo {name}"
},
"activeUsers": {
"newUsers": "Novos usuários",
"activeUsers": "Usuários ativos"
},
"usersAdminTable": {
"allUsers": "Todos usuários",
"id": "ID",
"username": "Nome de usuário",
"name": "Nome",
"workspaces": "Grupos",
"lastLogin": "Último login",
"dateJoined": "Inscrito",
"active": "Ativo"
},
"editUserContext": {
"changePassword": "Alterar senha",
"delete": "Excluído permanentemente"
},
"changePasswordForm": {
"newPassword": "Nova senha",
"repeatPassword": "Repetir a senha",
"changePassword": "Alterar a senha",
"error": {
"doesntMatch": "Este campo deve corresponder ao seu campo de senha."
}
},
"userForm": {
"fullName": "Nome completo",
"email": "E-mail",
"isActive": "Está ativo",
"warning": {
"changeEmail": "Alterar o endereço de e-mail deste usuário significa que, quando eles fizerem login, deverão usar o novo endereço de e-mail para fazer isso. Isso deve ser comunicado a esse usuário.",
"inactiveUser": "Quando um usuário é marcado como inativo, ele é impedido de entrar.",
"userStaff": "Tornar a equipe do usuário dá a eles acesso de administrador a todos os usuários, todos os grupos e a capacidade de revogar suas próprias permissões de equipe."
},
"error": {
"invalidName": "Insira um nome completo válido, deve ter mais de 2 letras e menos de 150.",
"invalidEmail": "Por favor insira um endereço de e-mail válido."
}
},
"changeUserPasswordModal": {
"changePassword": "Alterar senha para {username}"
},
"deleteUserModal": {
"title": "Deletar{username}",
"confirmation": "Tem certeza de que deseja excluir o usuário: {name}?",
"comment1": "A conta do usuário será excluída, mas os grupos dos quais o usuário é membro continuarão existindo. O grupo de usuários não será excluído, mesmo que este usuário seja o último usuário do grupo. A exclusão do último usuário de um grupo impede que qualquer pessoa possa acessar esse grupo.",
"comment2": "Depois de excluir um usuário, é possível que um novo usuário se inscreva novamente usando o endereço de e-mail do usuário excluído. Para garantir que eles não possam se inscrever novamente, desative o usuário e não o exclua.",
"delete": "Deletar usuário {username}"
},
"editUserModal": {
"delete": "Deletar usuário",
"edit": "Editar { username }"
},
"tableJSONExporter": {
"encoding": "Codificação"
},
@ -156,22 +76,6 @@
"tryAgain": "Tente novamente",
"new": "Novo"
},
"dashboard": {
"title": "Painel de controle",
"totals": "Totais",
"totalUsers": "Total de usuários",
"totalWorkspaces": "Total de grupos",
"totalApplications": "Total de aplicações",
"newUsers": "Novos usuários",
"newUsers24h": "Novos usuários nas últimas 24 horas",
"newUsers7days": "Novos usuários nos últimos 7 dias",
"newUsers30days": "Novos usuários nos últimos 30 dias",
"activeUsers": "Usuários ativos",
"activeUsers24h": "Usuários ativos nos últimas 24 horas",
"activeUsers7days": "Usuários ativos nos últimos 7 dias",
"activeUsers30days": "Usuários ativos nos últimos 30 dias",
"viewAll": "Visualizar tudo"
},
"licenses": {
"titleNoLicenses": "Sem licenças encontradas",
"titleLicenses": "Licenças",

View file

@ -1,15 +1,6 @@
{
"premium": {
"user": {
"isStaff": "工作人员与否",
"isWorkspaceAdmin": "组管理员与否",
"active": "生效的",
"deactivated": "停用的"
},
"adminType": {
"dashboard": "仪表板",
"users": "用户",
"workspaces": "团队",
"licenses": "许可证"
},
"viewType": {
@ -58,78 +49,6 @@
"registerLicenseForm": {
"licenseKey": "许可证码"
},
"workspacesAdminTable": {
"allWorkspaces": "所有集体",
"id": "ID",
"name": "名字",
"members": "成员",
"applications": "应用",
"created": "创建"
},
"editWorkspaceContext": {
"delete": "永久删除"
},
"deleteWorkspaceModal": {
"title": "删除 {name}",
"confirmation": "你确定要删除集体:{name}",
"comment": "该组将被永久删除,包括相关应用程序.此操作无法撤销.",
"delete": "删除集体{name}"
},
"activeUsers": {
"newUsers": "新用户",
"activeUsers": "活跃用户"
},
"usersAdminTable": {
"allUsers": "所有用户",
"id": "",
"username": "用户名",
"name": "名字",
"workspaces": "集体",
"lastLogin": "上次登录",
"dateJoined": "注册",
"active": "活跃的"
},
"editUserContext": {
"changePassword": "更改密码",
"delete": "永久删除",
"impersonate": "扮演"
},
"changePasswordForm": {
"newPassword": "新密码",
"repeatPassword": "重复密码",
"changePassword": "更改密码",
"error": {
"doesntMatch": "此字段必须与密码字段匹配."
}
},
"userForm": {
"fullName": "全名",
"email": "邮箱",
"isActive": "活动状态",
"warning": {
"changeEmail": "更改此用户的电子邮件地址意味着当他们登录时,必须使用新的电子邮件地址.这必须与该用户进行沟通.",
"inactiveUser": "当用户被标记为非活跃时,他们将无法登录.",
"userStaff": "让用户成为员工可以让他们对所有用户,所有组进行管理访问,并可以撤销您自己的员工权限."
},
"error": {
"invalidName": "请输入有效的全名,其长度必须大于2个字符,小于150个字符.",
"invalidEmail": "请输入有效的电子邮件地址."
}
},
"changeUserPasswordModal": {
"changePassword": "为{usermane}更改密码"
},
"deleteUserModal": {
"title": "删除{username}",
"confirmation": "你确定要删除这个用户:{name}",
"comment1": "用户帐户将被删除,但用户所属的组将继续存在.即使此用户是组中的最后一个用户,也不会删除用户组.删除组中的最后一个用户将阻止任何人访问该组.",
"comment2": "删除用户后,新用户可以使用删除的用户电子邮件地址再次注册.为了确保他们不能再次注册,请禁用用户并不要删除他们.",
"delete": "删除用户{username}"
},
"editUserModal": {
"delete": "删除用户",
"edit": "编辑{ username }"
},
"tableJSONExporter": {
"encoding": "编码"
},
@ -160,22 +79,6 @@
"tryAgain": "重试",
"new": "新"
},
"dashboard": {
"title": "仪表盘",
"totals": "总计",
"totalUsers": "用户总数",
"totalWorkspaces": "组总数",
"totalApplications": "应用程序总数",
"newUsers": "新用户",
"newUsers24h": "最新 24 小时的新用户",
"newUsers7days": "最近7天的新用户",
"newUsers30days": "最近30天的新用户",
"activeUsers": "活跃用户",
"activeUsers24h": "活跃用户持续 24 小时",
"activeUsers7days": "活跃用户最近 7 天",
"activeUsers30days": "活跃用户最近 30 天",
"viewAll": "查看全部"
},
"licenses": {
"titleNoLicenses": "未找到许可证",
"titleLicenses": "许可证",

View file

@ -1,6 +0,0 @@
import impersonate from '@baserow_premium/middleware/impersonate'
/* eslint-disable-next-line */
import Middleware from './middleware'
Middleware.impersonate = impersonate

View file

@ -6,8 +6,6 @@ import en from './locales/en.json'
import fr from './locales/fr.json'
export default function () {
this.addPlugin({ src: path.resolve(__dirname, 'middleware.js') })
this.nuxt.hook('i18n:extend-messages', (additionalMessages) => {
additionalMessages.push({ en, fr })
})
@ -29,6 +27,4 @@ export default function () {
// imports the original. We do this so that we can use the existing variables,
// mixins, placeholders etc.
this.options.css[0] = path.resolve(__dirname, 'assets/scss/default.scss')
this.options.router.middleware.push('impersonate')
}

View file

@ -4,12 +4,7 @@ import {
XMLTableExporter,
ExcelTableExporterType,
} from '@baserow_premium/tableExporterTypes'
import {
DashboardType,
WorkspacesAdminType,
UsersAdminType,
LicensesAdminType,
} from '@baserow_premium/adminTypes'
import { LicensesAdminType } from '@baserow_premium/adminTypes'
import rowCommentsStore from '@baserow_premium/store/row_comments'
import kanbanStore from '@baserow_premium/store/view/kanban'
import calendarStore from '@baserow_premium/store/view/calendar'
@ -104,9 +99,6 @@ export default (context) => {
app.$registry.registerNamespace('aiFieldOutputType')
app.$registry.register('plugin', new PremiumPlugin(context))
app.$registry.register('admin', new DashboardType(context))
app.$registry.register('admin', new UsersAdminType(context))
app.$registry.register('admin', new WorkspacesAdminType(context))
app.$registry.register('admin', new LicensesAdminType(context))
app.$registry.register('exporter', new JSONTableExporter(context))
app.$registry.register('exporter', new XMLTableExporter(context))

View file

@ -1,21 +1,6 @@
import path from 'path'
export const routes = [
{
name: 'admin-dashboard',
path: '/admin/dashboard',
component: path.resolve(__dirname, 'pages/admin/dashboard.vue'),
},
{
name: 'admin-users',
path: '/admin/users',
component: path.resolve(__dirname, 'pages/admin/users.vue'),
},
{
name: 'admin-workspaces',
path: '/admin/workspaces',
component: path.resolve(__dirname, 'pages/admin/workspaces.vue'),
},
{
name: 'admin-licenses',
path: '/admin/licenses',

View file

@ -1,10 +1,3 @@
import {
aUser,
createUsersForAdmin,
expectUserDeleted,
expectUserUpdated,
expectUserUpdatedRespondsWithError,
} from './user'
import { thereAreComments } from './comments'
import { createKanbanView, thereAreRowsInKanbanView } from './kanban'
import { createCalendarView, thereAreRowsInCalendarView } from './calendar'
@ -55,10 +48,6 @@ export default class MockPremiumServer extends MockServer {
})
}
thereAreUsers(users, page, options = {}) {
createUsersForAdmin(this.mock, users, page, options)
}
thereAreRowsInKanbanView(fieldOptions, rows) {
thereAreRowsInKanbanView(this.mock, fieldOptions, rows)
}
@ -71,22 +60,6 @@ export default class MockPremiumServer extends MockServer {
thereAreComments(this.mock, comments, tableId, rowId)
}
aUser(user = {}) {
return aUser(user)
}
expectUserDeleted(userId) {
expectUserDeleted(this.mock, userId)
}
expectUserUpdated(user, changes) {
expectUserUpdated(this.mock, user, changes)
}
expectUserUpdatedRespondsWithError(user, error) {
expectUserUpdatedRespondsWithError(this.mock, user, error)
}
expectPremiumViewUpdate(viewId, expectedContents) {
this.mock
.onPatch(`/database/view/${viewId}/premium`, expectedContents)

View file

@ -88,6 +88,85 @@ export class AdminType extends Registerable {
}
}
export class DashboardAdminType extends AdminType {
static getType() {
return 'dashboard'
}
getIconClass() {
return 'iconoir-home-simple'
}
getName() {
const { i18n } = this.app
return i18n.t('adminType.dashboard')
}
getRouteName() {
return 'admin-dashboard'
}
getOrder() {
return 1
}
}
export class UsersAdminType extends AdminType {
static getType() {
return 'users'
}
getIconClass() {
return 'iconoir-community'
}
getName() {
const { i18n } = this.app
return i18n.t('adminType.users')
}
getCategory() {
const { i18n } = this.app
return i18n.t('sidebar.people')
}
getRouteName() {
return 'admin-users'
}
getOrder() {
return 2
}
}
export class WorkspacesAdminType extends AdminType {
static getType() {
return 'workspaces'
}
getIconClass() {
return 'baserow-icon-groups'
}
getName() {
const { i18n } = this.app
return i18n.t('adminType.workspaces')
}
getCategory() {
const { i18n } = this.app
return i18n.t('sidebar.people')
}
getRouteName() {
return 'admin-workspaces'
}
getOrder() {
return 3
}
}
export class SettingsAdminType extends AdminType {
static getType() {
return 'settings'

View file

@ -180,3 +180,6 @@
@import 'dashboard/all';
@import 'export_workspace';
@import 'import_workspace';
@import 'admin_dashboard';
@import 'user_admin';
@import 'group_admin';

View file

@ -21,15 +21,15 @@
</template>
<script>
import UserAdminService from '@baserow_premium/services/admin/users'
import UsernameField from '@baserow_premium/components/admin/users/fields/UsernameField'
import UserWorkspacesField from '@baserow_premium/components/admin/users/fields/UserWorkspacesField'
import UserAdminService from '@baserow/modules/core/services/admin/users'
import UsernameField from '@baserow/modules/core/components/admin/users/fields/UsernameField'
import UserWorkspacesField from '@baserow/modules/core/components/admin/users/fields/UserWorkspacesField'
import CrudTable from '@baserow/modules/core/components/crudTable/CrudTable'
import SimpleField from '@baserow/modules/core/components/crudTable/fields/SimpleField'
import LocalDateField from '@baserow/modules/core/components/crudTable/fields/LocalDateField'
import ActiveField from '@baserow_premium/components/admin/users/fields/ActiveField'
import ActiveField from '@baserow/modules/core/components/admin/users/fields/ActiveField'
import MoreField from '@baserow/modules/core/components/crudTable/fields/MoreField'
import EditUserContext from '@baserow_premium/components/admin/users/contexts/EditUserContext'
import EditUserContext from '@baserow/modules/core/components/admin/users/contexts/EditUserContext'
import CrudTableColumn from '@baserow/modules/core/crudTable/crudTableColumn'
export default {
@ -72,7 +72,7 @@ export default {
),
new CrudTableColumn(
'is_active',
() => this.$t('premium.user.active'),
() => this.$t('user.active'),
ActiveField,
true
),

View file

@ -50,6 +50,7 @@
class="context__menu-item-link"
:class="{
'context__menu-item-link--loading': impersonateLoading,
disabled: !user.is_active,
}"
@click.prevent="impersonate"
>
@ -92,10 +93,10 @@ import { mapGetters } from 'vuex'
import context from '@baserow/modules/core/mixins/context'
import { notifyIf } from '@baserow/modules/core/utils/error'
import ChangePasswordModal from '@baserow_premium/components/admin/users/modals/ChangeUserPasswordModal'
import DeleteUserModal from '@baserow_premium/components/admin/users/modals/DeleteUserModal'
import EditUserModal from '@baserow_premium/components/admin/users/modals/EditUserModal'
import UserAdminService from '@baserow_premium/services/admin/users'
import ChangePasswordModal from '@baserow/modules/core/components/admin/users/modals/ChangeUserPasswordModal'
import DeleteUserModal from '@baserow/modules/core/components/admin/users/modals/DeleteUserModal'
import EditUserModal from '@baserow/modules/core/components/admin/users/modals/EditUserModal'
import UserAdminService from '@baserow/modules/core/services/admin/users'
export default {
name: 'EditUserContext',
@ -161,6 +162,9 @@ export default {
await this.changeIsActive(false)
},
impersonate() {
if (!this.user.is_active) {
return
}
this.impersonateLoading = true
let url = this.$nuxt.$router.resolve({ name: 'dashboard' }).href
// Adding the `__impersonate-user` query parameter impersonates the user when the

View file

@ -4,13 +4,13 @@
<i
class="iconoir-check user-admin-active__icon user-admin-active__icon--activated"
></i>
{{ parent.$t('premium.user.active') }}
{{ parent.$t('user.active') }}
</div>
<div v-else>
<i
class="iconoir-cancel user-admin-active__icon user-admin-active__icon--deactivated"
></i>
{{ parent.$t('premium.user.deactivated') }}
{{ parent.$t('user.deactivated') }}
</div>
</div>
</template>

View file

@ -8,7 +8,7 @@
<template #icon="{ record }">
<i
v-if="record.permissions === 'ADMIN'"
v-tooltip="$t('premium.user.isWorkspaceAdmin')"
v-tooltip="$t('user.isWorkspaceAdmin')"
class="user-admin-group__icon iconoir-user-crown"
></i>
</template>

View file

@ -11,7 +11,7 @@
</div>
<i
v-if="props.row.is_staff"
v-tooltip="parent.$t('premium.user.isStaff')"
v-tooltip="parent.$t('user.isStaff')"
class="user-admin-username__icon iconoir-user-crown"
></i>
</div>

View file

@ -62,7 +62,7 @@
</template>
</FormGroup>
<FormGroup small-label :label="$t('premium.user.isStaff')" required>
<FormGroup small-label :label="$t('user.isStaff')" required>
<Checkbox v-model="values.is_staff" :disabled="loading"></Checkbox>
<template #warning>

View file

@ -14,8 +14,8 @@
<script>
import modal from '@baserow/modules/core/mixins/modal'
import error from '@baserow/modules/core/mixins/error'
import UserAdminService from '@baserow_premium/services/admin/users'
import ChangePasswordForm from '@baserow_premium/components/admin/users/forms/ChangePasswordForm'
import UserAdminService from '@baserow/modules/core/services/admin/users'
import ChangePasswordForm from '@baserow/modules/core/components/admin/users/forms/ChangePasswordForm'
export default {
name: 'ChangePasswordModal',

View file

@ -35,7 +35,7 @@
<script>
import modal from '@baserow/modules/core/mixins/modal'
import error from '@baserow/modules/core/mixins/error'
import UserAdminService from '@baserow_premium/services/admin/users'
import UserAdminService from '@baserow/modules/core/services/admin/users'
export default {
name: 'DeleteUserModal',

View file

@ -31,9 +31,9 @@
<script>
import modal from '@baserow/modules/core/mixins/modal'
import error from '@baserow/modules/core/mixins/error'
import UserAdminService from '@baserow_premium/services/admin/users'
import UserForm from '@baserow_premium/components/admin/users/forms/UserForm'
import DeleteUserModal from '@baserow_premium/components/admin/users/modals/DeleteUserModal'
import UserAdminService from '@baserow/modules/core/services/admin/users'
import UserForm from '@baserow/modules/core/components/admin/users/forms/UserForm'
import DeleteUserModal from '@baserow/modules/core/components/admin/users/modals/DeleteUserModal'
export default {
name: 'EditUserModal',

View file

@ -20,14 +20,14 @@
</template>
<script>
import WorkspacesAdminService from '@baserow_premium/services/admin/workspaces'
import WorkspacesAdminService from '@baserow/modules/core/services/admin/workspaces'
import CrudTable from '@baserow/modules/core/components/crudTable/CrudTable'
import SimpleField from '@baserow/modules/core/components/crudTable/fields/SimpleField'
import LocalDateField from '@baserow/modules/core/components/crudTable/fields/LocalDateField'
import MoreField from '@baserow/modules/core/components/crudTable/fields/MoreField'
import WorkspaceUsersField from '@baserow_premium/components/admin/workspaces/fields/WorkspaceUsersField'
import WorkspaceNameField from '@baserow_premium/components/admin/workspaces/fields/WorkspaceNameField'
import EditWorkspaceContext from '@baserow_premium/components/admin/workspaces/contexts/EditWorkspaceContext'
import WorkspaceUsersField from '@baserow/modules/core/components/admin/workspaces/fields/WorkspaceUsersField'
import WorkspaceNameField from '@baserow/modules/core/components/admin/workspaces/fields/WorkspaceNameField'
import EditWorkspaceContext from '@baserow/modules/core/components/admin/workspaces/contexts/EditWorkspaceContext'
import CrudTableColumn from '@baserow/modules/core/crudTable/crudTableColumn'
export default {

View file

@ -26,7 +26,7 @@
<script>
import context from '@baserow/modules/core/mixins/context'
import DeleteWorkspaceModal from '@baserow_premium/components/admin/workspaces/modals/DeleteWorkspaceModal'
import DeleteWorkspaceModal from '@baserow/modules/core/components/admin/workspaces/modals/DeleteWorkspaceModal'
export default {
name: 'EditWorkspaceContext',

View file

@ -1,5 +1,5 @@
<script>
import UserWorkspacesField from '@baserow_premium/components/admin/users/fields/UserWorkspacesField'
import UserWorkspacesField from '@baserow/modules/core/components/admin/users/fields/UserWorkspacesField'
export default {
name: 'WorkspaceUsersField',

View file

@ -34,7 +34,7 @@
<script>
import modal from '@baserow/modules/core/mixins/modal'
import error from '@baserow/modules/core/mixins/error'
import WorkspacesAdminService from '@baserow_premium/services/admin/workspaces'
import WorkspacesAdminService from '@baserow/modules/core/services/admin/workspaces'
export default {
name: 'DeleteWorkspaceModal',

View file

@ -814,5 +814,109 @@
},
"templateCard": {
"viewMore": "Mehr anzeigen"
},
"user": {
"isStaff": "Ist Personal",
"isWorkspaceAdmin": "Ist Arbeitsbereichadministrator",
"active": "Aktiv",
"deactivated": "Deaktiviert"
},
"adminType": {
"dashboard": "Dashboard",
"users": "Benutzer",
"workspaces": "Arbeitsbereiche"
},
"workspacesAdminTable": {
"allWorkspaces": "Alle Arbeitsbereiche",
"id": "ID",
"name": "Name",
"members": "Mitglieder",
"applications": "Anwendungen",
"created": "Erstellt",
"rowCount": "Anzahl der Zeilen",
"freeUsers": "Kostenlose Benutzer",
"seatsTaken": "Sitze besetzt",
"storageUsage": "Verwendeter Speicherplatz (MB)",
"usageHelpText": "Wird nachts berechnet, wenn die Einstellung \"Arbeitsbereichsnutzung verfolgen\" aktiviert ist"
},
"editWorkspaceContext": {
"delete": "Dauerhaft löschen"
},
"deleteWorkspaceModal": {
"title": "Löschen {name}",
"confirmation": "Sind Sie sicher, dass Sie den Arbeitsbereich löschen wollen: {name}?",
"comment": "Der Arbeitsbereich wird dauerhaft gelöscht, einschließlich der zugehörigen Anwendungen. Es ist nicht möglich, diese Aktion rückgängig zu machen.",
"delete": "Arbeitsbereich {name} löschen"
},
"activeUsers": {
"newUsers": "Neuer Benutzer",
"activeUsers": "Aktive Nutzer"
},
"usersAdminTable": {
"allUsers": "Alle Benutzer",
"id": "ID",
"username": "Benutzername",
"name": "Name",
"workspaces": "Arbeitsbereiche",
"lastLogin": "Zuletzt angemeldet",
"dateJoined": "Angemeldet",
"active": "Aktiv"
},
"editUserContext": {
"changePassword": "Passwort ändern",
"delete": "Dauerhaft löschen",
"impersonate": "Imitieren"
},
"changePasswordForm": {
"newPassword": "Neues Passwort",
"repeatPassword": "Passwort wiederholen",
"changePassword": "Passwort ändern",
"error": {
"doesntMatch": "Dieses Feld muss mit Ihrem Passwortfeld übereinstimmen."
}
},
"userForm": {
"fullName": "Vollständiger Name",
"email": "Email",
"isActive": "Ist aktiv",
"warning": {
"changeEmail": "Die Änderung der E-Mail-Adresse des Benutzers bedeutet, dass er sich mit der neuen E-Mail-Adresse anmelden muss, wenn er sich anmeldet. Dies muss dem Benutzer mitgeteilt werden.",
"inactiveUser": "Wenn ein Benutzer als inaktiv markiert ist, kann er sich nicht mehr anmelden.",
"userStaff": "Wenn Sie einen Benutzer zu einem Mitarbeiter machen, erhält dieser Administratorenzugriff auf alle Benutzer und Arbeitsbereiche sowie die Möglichkeit, Ihren eigenen Mitarbeitern die Berechtigungen zu entziehen."
},
"error": {
"invalidName": "Bitte geben Sie einen gültigen vollständigen Namen ein. Er muss länger als 2 Buchstaben und kürzer als 150 sein.",
"invalidEmail": "Bitte geben Sie eine gültige E-Mail Adresse ein."
}
},
"changeUserPasswordModal": {
"changePassword": "Passwort für {Benutzername} ändern"
},
"deleteUserModal": {
"title": "Löschen {username}",
"confirmation": "Sind Sie sicher, dass Sie den Benutzer löschen möchten: {name}?",
"comment1": "Das Benutzerkonto wird gelöscht, aber die Arbeitsbereiche, in denen der Benutzer Mitglied ist, bleiben bestehen. Die Benutzergruppe wird nicht gelöscht, auch wenn dieser Benutzer der letzte Benutzer in dem Arbeitsbereich ist. Durch das Löschen des letzten Benutzers in einem Arbeitsbereich wird verhindert, dass jemand auf diesen Arbeitsbereich zugreifen kann.",
"comment2": "Nach dem Löschen eines Benutzers ist es möglich, dass sich ein neuer Benutzer mit der E-Mail-Adresse des gelöschten Benutzers erneut anmeldet. Um sicherzustellen, dass sie sich nicht erneut anmelden können, deaktivieren Sie den Benutzer und löschen Sie ihn nicht.",
"delete": "Benutzer {username} löschen"
},
"editUserModal": {
"delete": "Benutzer löschen",
"edit": "Bearbeiten { username }"
},
"adminDashboard": {
"title": "Dashboard",
"totals": "Summen",
"totalUsers": "Anzahl der Benutzer",
"totalWorkspaces": "Gesamtzahl der Arbeitsbereiche",
"totalApplications": "Gesamtanzahl der Anträge",
"newUsers": "Neue Benutzer",
"newUsers24h": "Neue Benutzer in den letzten 24 Stunden",
"newUsers7days": "Neue Benutzer in den letzten 7 Tagen",
"newUsers30days": "Neue Benutzer in den letzten 30 Tagen",
"activeUsers": "Aktive Benutzer",
"activeUsers24h": "Aktive Benutzer in den letzten 24 Stunden",
"activeUsers7days": "Aktive Benutzer in den letzten 7 Tagen",
"activeUsers30days": "Aktive Benutzer in den letzten 30 Tagen",
"viewAll": "Alle anzeigen"
}
}

View file

@ -809,6 +809,109 @@
"dataExplorerNode": {
"showMore": "Show more repetitions"
},
"user": {
"isStaff": "Is staff",
"isWorkspaceAdmin": "Is workspace admin",
"active": "Active",
"deactivated": "Deactivated"
},
"adminType": {
"dashboard": "Dashboard",
"users": "Users",
"workspaces": "Workspaces"
},
"workspacesAdminTable": {
"allWorkspaces": "All workspaces",
"id": "ID",
"name": "Name",
"members": "Members",
"applications": "Applications",
"created": "Created",
"rowCount": "Row count",
"freeUsers": "Free users",
"seatsTaken": "Seats taken",
"storageUsage": "Storage Used (MB)",
"usageHelpText": "Calculated nightly when the track workspace usage setting is enabled"
},
"editWorkspaceContext": {
"delete": "Permanently delete"
},
"deleteWorkspaceModal": {
"title": "Delete {name}",
"confirmation": "Are you sure you want to delete the workspace: {name}?",
"comment": "The workspace will be permanently deleted, including the related applications. It is not possible to undo this action.",
"delete": "Delete workspace {name}"
},
"activeUsers": {
"newUsers": "New users",
"activeUsers": "Active users"
},
"usersAdminTable": {
"allUsers": "All users",
"username": "Username",
"name": "Name",
"workspaces": "Workspaces",
"lastLogin": "Last login",
"dateJoined": "Signed up",
"active": "Active"
},
"editUserContext": {
"changePassword": "Change password",
"delete": "Permanently delete",
"impersonate": "Impersonate"
},
"changePasswordForm": {
"newPassword": "New password",
"repeatPassword": "Repeat password",
"changePassword": "Change password",
"error": {
"doesntMatch": "This field must match your password field."
}
},
"userForm": {
"fullName": "Full name",
"email": "Email",
"isActive": "Is active",
"warning": {
"changeEmail": "Changing this users email address means when they sign in they must use the new email address to do so. This must be communicated with that user.",
"inactiveUser": "When a user is marked as inactive they are prevented from signing in.",
"userStaff": "Making the user staff gives them admin access to all users, all workspaces and the ability to revoke your own staff permissions."
},
"error": {
"invalidName": "Please enter a valid full name, it must be longer than 2 letters and less than 150.",
"invalidEmail": "Please enter a valid e-mail address."
}
},
"changeUserPasswordModal": {
"changePassword": "Change password for {username}"
},
"deleteUserModal": {
"title": "Delete {username}",
"confirmation": "Are you sure you want to delete the user: {name}?",
"comment1": "The user account will be deleted, however the workspaces that user is a member of will continue existing. The users workspace will not be deleted, even if this user is the last user in the workspace. Deleting the last user in a workspace prevents anyone being able to access that workspace.",
"comment2": "After deleting a user it is possible for a new user to sign up again using the deleted users email address. To ensure they cannot sign up again instead deactivate the user and do not delete them.",
"delete": "Delete user {username}"
},
"editUserModal": {
"delete": "Delete user",
"edit": "Edit { username }"
},
"adminDashboard": {
"title": "Dashboard",
"totals": "Totals",
"totalUsers": "Total users",
"totalWorkspaces": "Total workspaces",
"totalApplications": "Total applications",
"newUsers": "New users",
"newUsers24h": "New users last 24 hours",
"newUsers7days": "New users last 7 days",
"newUsers30days": "New users last 30 days",
"activeUsers": "Active users",
"activeUsers24h": "Active users last 24 hours",
"activeUsers7days": "Active users last 7 days",
"activeUsers30days": "Active users last 30 days",
"viewAll": "View all"
},
"formGroup": {
"protectedField": "This field is protected. Click to change.",
"cancelProtectedField": "Cancel change"

View file

@ -892,5 +892,109 @@
"invalidResourceMessage": "El archivo proporcionado no es una exportación Baserow válida.",
"untrustedPublicKeyTitle": "Firma no fiable",
"untrustedPublicKeyMessage": "El archivo proporcionado está firmado con una clave pública no fiable. Pida a su administrador que añada la clave pública a la lista de claves de confianza o desactive la verificación de firma para poder importar este archivo."
},
"user": {
"isStaff": "Es staff",
"isWorkspaceAdmin": "Es administrador de grupo",
"active": "Activo",
"deactivated": "Desactivado"
},
"adminType": {
"dashboard": "Tablero",
"users": "Usuarios",
"workspaces": "Grupos"
},
"workspacesAdminTable": {
"allWorkspaces": "Todos los grupos",
"id": "ID",
"name": "Nombre",
"members": "Miembros",
"applications": "Aplicaciones",
"created": "Creado",
"seatsTaken": "Asientos ocupados",
"storageUsage": "Almacenamiento utilizado (MB)",
"usageHelpText": "Calculado por la noche cuando la configuración de uso grupal está habilitada",
"rowCount": "Recuento de filas",
"freeUsers": "Usuarios gratuitos"
},
"editWorkspaceContext": {
"delete": "Eliminado permanentemente"
},
"deleteWorkspaceModal": {
"title": "Eliminar {name}",
"confirmation": "¿Está seguro de que desea eliminar el grupo: {name}?",
"comment": "El grupo se eliminará de forma permanente, incluidas las aplicaciones relacionadas. No es posible deshacer esta acción.",
"delete": "Eliminar grupo {name}"
},
"activeUsers": {
"newUsers": "Nuevos usuarios",
"activeUsers": "Usuarios activos"
},
"usersAdminTable": {
"allUsers": "Todos los usuarios",
"id": "id",
"username": "Nombre de usuario",
"name": "Nombre",
"workspaces": "Grupos",
"lastLogin": "Último acceso",
"dateJoined": "Inscrito",
"active": "Activo"
},
"editUserContext": {
"changePassword": "Cambiar la contraseña",
"delete": "Borrar permanentemente",
"impersonate": "Suplantar"
},
"changePasswordForm": {
"newPassword": "Nueva contraseña",
"repeatPassword": "Repetir contraseña",
"changePassword": "Cambiar contraseña",
"error": {
"doesntMatch": "Este campo debe coincidir con su campo de contraseña."
}
},
"userForm": {
"fullName": "Nombre completo",
"email": "Email",
"isActive": "Está activo",
"warning": {
"changeEmail": "Cambiar la dirección de correo electrónico de este usuario significa que cuando inician sesión deben usar la nueva dirección de correo electrónico para hacerlo. Esto debe ser comunicado con ese usuario.",
"inactiveUser": "Cuando un usuario se marca como inactivo, no puede iniciar sesión.",
"userStaff": "Convertir al usuario en personal le da acceso de administrador a todos los usuarios, todos los espacios de trabajo, y la capacidad de revocar tus propios permisos de personal."
},
"error": {
"invalidName": "Ingrese un nombre completo válido, debe tener más de 2 letras y menos de 150.",
"invalidEmail": "Por favor, introduce una dirección de correo electrónico válida."
}
},
"changeUserPasswordModal": {
"changePassword": "Cambiar contraseña para {username}"
},
"deleteUserModal": {
"title": "Eliminar {username}",
"confirmation": "¿Está seguro de que desea eliminar el usuario: {name}?",
"comment1": "La cuenta de usuario se eliminará, pero los espacios de trabajo de los que el usuario es miembro seguirán existiendo. El espacio de trabajo del usuario no se eliminará, incluso si este usuario es el último usuario en el espacio de trabajo. Si se elimina el último usuario de un espacio de trabajo, nadie podrá acceder a ese espacio de trabajo.",
"comment2": "Después de eliminar un usuario, es posible que un nuevo usuario se registre nuevamente utilizando la dirección de correo electrónico de los usuarios eliminados. Para asegurarse de que no puedan volver a registrarse, desactive al usuario y no lo elimine.",
"delete": "Eliminar usuario {username}"
},
"editUserModal": {
"delete": "Eliminar usuario",
"edit": "Editar {username}"
},
"adminDashboard": {
"title": "Tablero",
"totals": "Totales",
"totalUsers": "Usuarios totales",
"totalWorkspaces": "Grupos totales",
"totalApplications": "Aplicaciones totales",
"newUsers": "Nuevos usuarios",
"newUsers24h": "Nuevos usuarios últimas 24 horas",
"newUsers7days": "Nuevos usuarios últimos 7 días",
"newUsers30days": "Nuevos usuarios últimos 30 días",
"activeUsers": "Usuarios activos",
"activeUsers24h": "Usuarios activos últimas 24 horas",
"activeUsers7days": "Usuarios activos últimos 7 días",
"activeUsers30days": "Usuarios activos últimos 30 días",
"viewAll": "Ver todo"
}
}

View file

@ -892,5 +892,109 @@
"import": "Importer",
"done": "Valider",
"databases": "Bases de données"
},
"user": {
"isStaff": "Est collaborateur",
"isWorkspaceAdmin": "Est l'administrateur du projet",
"active": "Actif",
"deactivated": "Inactif"
},
"adminType": {
"dashboard": "Statistiques",
"users": "Utilisateurs",
"workspaces": "Projets"
},
"workspacesAdminTable": {
"allWorkspaces": "Liste des projets",
"id": "ID",
"name": "Nom",
"members": "Membres",
"applications": "Applications",
"created": "Créé le",
"seatsTaken": "Places occupées",
"storageUsage": "Stockage utilisé (Mo)",
"rowCount": "Nombre de lignes",
"freeUsers": "Utilisateurs gratuits",
"usageHelpText": "Calculé chaque nuit lorsque le paramètre de suivi de l'utilisation des projets est activé"
},
"editWorkspaceContext": {
"delete": "Supprimer définitivement"
},
"deleteWorkspaceModal": {
"title": "Supprimer {name}",
"confirmation": "Êtes-vous sûr·e de vouloir supprimer le projet : {name} ?",
"comment": "Le projet va être supprimé définitivement ainsi que ses applications liées. Il est impossible d'annuler cette action.",
"delete": "Supprimer le projet {name}"
},
"activeUsers": {
"newUsers": "Nouveaux utilisateurs",
"activeUsers": "Utilisateurs actifs"
},
"usersAdminTable": {
"allUsers": "Liste des utilisateurs",
"id": "ID",
"username": "Identifiant",
"name": "Nom",
"workspaces": "Projets",
"lastLogin": "Dernière connexion",
"dateJoined": "Date d'inscription",
"active": "Actif"
},
"editUserContext": {
"changePassword": "Modifier le mot de passe",
"delete": "Supprimer définitivement",
"impersonate": "Usurper"
},
"changePasswordForm": {
"newPassword": "Nouveau mot de passe",
"repeatPassword": "Répétez le mot de passe",
"changePassword": "Mettre à jour le mot de passe",
"error": {
"doesntMatch": "Les deux mots de passe ne correspondent pas."
}
},
"userForm": {
"fullName": "Nom complet",
"email": "Adresse électronique",
"isActive": "Est actif",
"warning": {
"changeEmail": "Si vous changez l'adresse électronique, l'utilisateur devra désormais utiliser celle-ci pour s'identifier. Ceci doit être signifié à l'utilisateur.",
"inactiveUser": "Un utilisateur inactif n'est plus en mesure de s'identifier.",
"userStaff": "Un collaborateur a accès à la liste des utilisateurs, des projets et peut changer les permissions de tous les utilisateurs."
},
"error": {
"invalidName": "Veuillez saisir un nom valide, il doit être composé de plus de 2 caractères et moins de 150.",
"invalidEmail": "Veuillez saisir une adresse électronique valide."
}
},
"changeUserPasswordModal": {
"changePassword": "Changer le mot de passe pour {username}"
},
"deleteUserModal": {
"title": "Supprimer {username}",
"confirmation": "Êtes-vous sûr·e de vouloir supprimer l'utilisateur : {name} ?",
"comment1": "Le compte de l'utilisateur va être supprimé, cependant les projets dont l'utilisateur est membre vont continuer d'exister. Ces projets ne seront pas supprimés même si cet utilisateur est le dernier utilisateur du projet. Supprimer le dernier utilisateur d'un projet interdit à quiconque d'y accéder de nouveau.",
"comment2": "Après avoir supprimé un utilisateur, il sera possible de créer un nouveau compte avec la même adresse email. Si vous souhaitez éviter que l'utilisateur puisse se connecter avec cette adresse, vous pouvez désactiver l'utilisateur plutôt que supprimer son compte.",
"delete": "Supprimer l'utilisateur {username}"
},
"editUserModal": {
"delete": "Supprimer l'utilisateur",
"edit": "Modifier {username}"
},
"adminDashboard": {
"title": "Statistiques",
"totals": "Résumé",
"totalUsers": "Nombre d'utilisateur",
"totalWorkspaces": "Nombre de projet",
"totalApplications": "Nombre d'application",
"newUsers": "Nouveaux utilisateurs",
"newUsers24h": "Sur les dernières 24h",
"newUsers7days": "sur les 7 derniers jours",
"newUsers30days": "Sur les 30 derniers jours",
"activeUsers": "Utilisateurs actifs",
"activeUsers24h": "Sur les dernières 24h",
"activeUsers7days": "sur les 7 derniers jours",
"activeUsers30days": "Sur les 30 derniers jours",
"viewAll": "Consulter"
}
}

View file

@ -826,5 +826,110 @@
},
"templateCard": {
"viewMore": "Vedi di più"
},
"user": {
"isStaff": "È staff",
"isWorkspaceAdmin": "È amministratore del progetto",
"active": "Attivo",
"deactivated": "Disattivato"
},
"adminType": {
"dashboard": "Dashboard",
"users": "Utenti",
"workspaces": "Progetti",
"licenses": "Gestisci le licenze"
},
"workspacesAdminTable": {
"allWorkspaces": "Tutti i progetti",
"id": "ID",
"name": "Nome",
"members": "Membri",
"applications": "Applicazioni",
"created": "Creato",
"freeUsers": "Utenti gratuiti",
"usageHelpText": "Calcolato ogni notte se l'impostazione è attiva",
"seatsTaken": "Licenze assegnate",
"rowCount": "Numero di righe",
"storageUsage": "Spazio disco utilizzato (MB)"
},
"editWorkspaceContext": {
"delete": "Eliminato in modo permanente"
},
"deleteWorkspaceModal": {
"title": "Elimina {name}",
"confirmation": "Sei sicuro di voler eliminare il progetto: {name}?",
"comment": "Il progetto verrà eliminato in modo permanente, così come tutte le applicazioni associate. Non è possibile annullare questa azione.",
"delete": "Elimina progetto {name}"
},
"activeUsers": {
"newUsers": "Nuovi utenti",
"activeUsers": "Utenti attivi"
},
"usersAdminTable": {
"allUsers": "Tutti gli utenti",
"id": "ID",
"username": "Nome utente",
"name": "Nome",
"workspaces": "Progetti",
"lastLogin": "Ultimo accesso",
"dateJoined": "Registrato",
"active": "Attivo"
},
"editUserContext": {
"changePassword": "Modifica password",
"delete": "Eliminato in modo permanente",
"impersonate": "Impersona"
},
"changePasswordForm": {
"newPassword": "Nuova password",
"repeatPassword": "Ripeti la password",
"changePassword": "Modifica la password",
"error": {
"doesntMatch": "Questo campo deve corrispondere al campo password."
}
},
"userForm": {
"fullName": "Nome completo",
"email": "E-mail",
"isActive": "È attivo",
"warning": {
"changeEmail": "Questo è l'indirizzo che l'utente dovrà utilizzare per la registrazione. Se lo modifichi, assicurati di comunicarlo alla persone interessata.",
"inactiveUser": "Quando un utente è contrassegnato come non attivo non potrà più effettuare l'accesso.",
"userStaff": "I permessi di staff danno al personale l'accesso come amministratore a tutti gli utenti e a tutti i progetti."
},
"error": {
"invalidName": "Inserisci un nome completo valido, deve essere più lungo di 2 lettere e meno di 150.",
"invalidEmail": "Inserisci un indirizzo e-mail valido."
}
},
"changeUserPasswordModal": {
"changePassword": "Modifica password per {username}"
},
"deleteUserModal": {
"title": "Elimina {username}",
"confirmation": "Sei sicuro di voler eliminare l'utente: {name}?",
"comment1": "L'account sarà eliminato. Tuttavia, i progetti di cui l'utente è membro continueranno a esistere. L'eliminazione dell'ultimo utente del progetto impedirà a chiunque di accedere a quel progetto.",
"comment2": "L'utente eliminato potrà nuovamente iscriversi utilizzando la stessa email. Per assicurarti di impedire una nuova iscrizione, disattiva l'utente anziché eliminarlo.",
"delete": "Elimina utente {username}"
},
"editUserModal": {
"delete": "Elimina utente",
"edit": "Modifica {username}"
},
"adminDashboard": {
"title": "Dashboard",
"totals": "Totali",
"totalUsers": "Totale utenti",
"totalWorkspaces": "Totale progetti",
"totalApplications": "Totale applicazioni",
"newUsers": "Nuovi utenti",
"newUsers24h": "Nuovi utenti nelle ultime 24 ore",
"newUsers7days": "Nuovi utenti nelle ultimi 7 giorni",
"newUsers30days": "Nuovi utenti nelle ultimi 30 giorni",
"activeUsers": "Utenti attivi",
"activeUsers24h": "Utenti attivi nelle ultime 24 ore",
"activeUsers7days": "Utenti attivi nelle ultimi 7 giorni",
"activeUsers30days": "Utenti attivi nelle ultimi 30 giorni",
"viewAll": "Vedi tutti"
}
}

View file

@ -514,5 +514,103 @@
},
"highestPaidRoleField": {
"billable": "課金可能"
},
"user": {
"isStaff": "はスタッフです",
"isWorkspaceAdmin": "はグループ管理者です",
"active": "有効",
"deactivated": "無効"
},
"adminType": {
"dashboard": "ダッシュボード",
"users": "ユーザー",
"workspaces": "グループ"
},
"workspacesAdminTable": {
"allWorkspaces": "全グループ",
"id": "ID",
"name": "名前",
"members": "メンバー",
"applications": "アプリケーション",
"created": "作成されました"
},
"editWorkspaceContext": {
"delete": "完全に削除"
},
"deleteWorkspaceModal": {
"title": "{name} を削除",
"confirmation": "本当にグループ「 {name} 」を削除しますか?",
"comment": "グループは完全に削除され、関連するアプリケーションも削除されます。この処理はやり直し出来ません。",
"delete": "グループ「 {name} 」を削除"
},
"activeUsers": {
"newUsers": "新規ユーザー",
"activeUsers": "有効なユーザー"
},
"usersAdminTable": {
"allUsers": "全ユーザー",
"username": "ユーザー名",
"name": "名前",
"workspaces": "グループ",
"lastLogin": "最後のログイン",
"dateJoined": "登録",
"active": "有効"
},
"editUserContext": {
"changePassword": "パスワード変更",
"delete": "完全に削除",
"impersonate": "インパーソネート"
},
"changePasswordForm": {
"newPassword": "新しいパスワード",
"repeatPassword": "パスワード再入力",
"changePassword": "パスワード変更",
"error": {
"doesntMatch": "入力されたパスワードと一致しません。"
}
},
"userForm": {
"fullName": "氏名",
"email": "Eメール",
"isActive": "は有効です",
"warning": {
"changeEmail": "Eメールを変更すると、ログインも新しいEメールで行う必要があります。ユーザーへ必ず伝えて下さい。",
"inactiveUser": "無効なユーザーはログイン出来ません。",
"userStaff": "スタッフ権限を持つユーザーは管理者としてすべてのユーザー、グループにアクセスできて、他ユーザーのスタッフ権限を無効にすることも出来ます。"
},
"error": {
"invalidName": "正しい氏名を 2 文字以上、 150 文字以内で入力して下さい。",
"invalidEmail": "正しいEメールアドレスを入力して下さい。"
}
},
"changeUserPasswordModal": {
"changePassword": "{username} のパスワードを変更する"
},
"deleteUserModal": {
"title": "{username} を削除",
"confirmation": "本当にユーザー「 {name} 」を削除しますか?",
"comment1": "このユーザーアカウントは削除されますが、グループは残ります。最後のユーザーを削除しても、グループは残りますが、誰もそのグループにアクセス出来なくなります。",
"comment2": "削除されたユーザーのEメールを使って新しいユーザーを作成することは可能です。削除ではなくユーザーを無効にすることで、同じEメールでのユーザーの作成を防ぐことが出来ます。",
"delete": "{username} を削除"
},
"editUserModal": {
"delete": "ユーザー削除",
"edit": "{username} を編集"
},
"adminDashboard": {
"title": "ダッシュボード",
"totals": "合計",
"totalUsers": "ユーザー全数",
"totalWorkspaces": "グループ全数",
"totalApplications": "アプリケーション全数",
"newUsers": "新しいユーザー",
"newUsers24h": "24時間以内に作成されたユーザー",
"newUsers7days": "7 日以内に作成されたユーザー",
"newUsers30days": "30 日以内に作成されたユーザー",
"activeUsers": "有効なユーザー",
"activeUsers24h": "24時間以内の有効なユーザー",
"activeUsers7days": "7日以内の有効なユーザー",
"activeUsers30days": "30日以内の有効なユーザー",
"viewAll": "すべて表示"
}
}

View file

@ -802,5 +802,108 @@
},
"dataExplorerNode": {
"showMore": "더 많은 반복 표시"
},
"user": {
"isStaff": "직원 여부",
"isWorkspaceAdmin": "워크스페이스 관리자 여부",
"active": "활성",
"deactivated": "비활성화됨"
},
"adminType": {
"dashboard": "대시보드",
"users": "사용자",
"workspaces": "워크스페이스"
},
"workspacesAdminTable": {
"allWorkspaces": "모든 워크스페이스",
"id": "ID",
"name": "이름",
"members": "멤버",
"applications": "애플리케이션",
"created": "생성됨",
"rowCount": "행 수",
"freeUsers": "무료 사용자",
"seatsTaken": "사용된 좌석",
"storageUsage": "사용된 저장소 (MB)",
"usageHelpText": "워크스페이스 사용 추적 설정이 활성화된 경우 매일 밤 계산됩니다"
},
"editWorkspaceContext": {
"delete": "영구 삭제"
},
"deleteWorkspaceModal": {
"title": "{name} 삭제",
"confirmation": "워크스페이스 {name}을(를) 삭제하시겠습니까?",
"comment": "워크스페이스는 관련된 애플리케이션과 함께 영구적으로 삭제됩니다. 이 작업은 되돌릴 수 없습니다.",
"delete": "워크스페이스 {name} 삭제"
},
"activeUsers": {
"newUsers": "신규 사용자",
"activeUsers": "활성 사용자"
},
"usersAdminTable": {
"allUsers": "모든 사용자",
"username": "사용자 이름",
"name": "이름",
"workspaces": "워크스페이스",
"lastLogin": "마지막 로그인",
"dateJoined": "가입일",
"active": "활성"
},
"editUserContext": {
"changePassword": "비밀번호 변경",
"delete": "영구 삭제",
"impersonate": "사용자 가장"
},
"changePasswordForm": {
"newPassword": "새 비밀번호",
"repeatPassword": "비밀번호 재입력",
"changePassword": "비밀번호 변경",
"error": {
"doesntMatch": "이 필드는 비밀번호 필드와 일치해야 합니다."
}
},
"userForm": {
"fullName": "전체 이름",
"email": "이메일",
"isActive": "활성 여부",
"warning": {
"changeEmail": "이 사용자의 이메일 주소를 변경하면 로그인 시 새 이메일 주소를 사용해야 합니다. 이는 해당 사용자에게 전달되어야 합니다.",
"inactiveUser": "사용자가 비활성화되면 로그인할 수 없습니다.",
"userStaff": "사용자를 직원으로 지정하면 모든 사용자와 워크스페이스에 대한 관리자 액세스 권한이 부여되며, 본인의 직원 권한을 철회할 수 있습니다."
},
"error": {
"invalidName": "유효한 전체 이름을 입력하세요. 2자 이상 150자 이하여야 합니다.",
"invalidEmail": "유효한 이메일 주소를 입력하세요."
}
},
"changeUserPasswordModal": {
"changePassword": "{username}의 비밀번호 변경"
},
"deleteUserModal": {
"title": "{username} 삭제",
"confirmation": "사용자 {name}을(를) 삭제하시겠습니까?",
"comment1": "사용자 계정은 삭제되지만, 해당 사용자가 속한 워크스페이스는 계속 존재합니다. 해당 사용자가 워크스페이스의 마지막 사용자이더라도 사용자의 워크스페이스는 삭제되지 않습니다. 워크스페이스의 마지막 사용자를 삭제하면 해당 워크스페이스에 아무도 접근할 수 없게 됩니다.",
"comment2": "사용자를 삭제한 후 삭제된 사용자의 이메일 주소를 사용하여 새 사용자가 다시 가입할 수 있습니다. 다시 가입하지 못하도록 하려면 사용자를 삭제하지 않고 비활성화하세요.",
"delete": "사용자 {username} 삭제"
},
"editUserModal": {
"delete": "사용자 삭제",
"edit": "{username} 편집"
},
"adminDashboard": {
"title": "대시보드",
"totals": "합계",
"totalUsers": "전체 사용자",
"totalWorkspaces": "전체 워크스페이스",
"totalApplications": "전체 애플리케이션",
"newUsers": "신규 사용자",
"newUsers24h": "지난 24시간 동안 신규 사용자",
"newUsers7days": "지난 7일 동안 신규 사용자",
"newUsers30days": "지난 30일 동안 신규 사용자",
"activeUsers": "활성 사용자",
"activeUsers24h": "지난 24시간 동안 활성 사용자",
"activeUsers7days": "지난 7일 동안 활성 사용자",
"activeUsers30days": "지난 30일 동안 활성 사용자",
"viewAll": "모두 보기"
}
}
}

View file

@ -892,5 +892,110 @@
"invalidResourceMessage": "Het geleverde bestand is geen geldige Baserow export.",
"untrustedPublicKeyTitle": "Onbetrouwbare handtekening",
"untrustedPublicKeyMessage": "Het geleverde bestand is ondertekend met een onbetrouwbare openbare sleutel. Vraag je beheerder om de openbare sleutel toe te voegen aan de lijst van vertrouwde sleutels of de handtekeningverificatie uit te schakelen om dit bestand te kunnen importeren."
},
"user": {
"isStaff": "Is personeel",
"isWorkspaceAdmin": "Is werkruimte beheerder",
"active": "Ingeschakeld",
"deactivated": "Uitgeschakeld"
},
"adminType": {
"dashboard": "Dashboard",
"users": "Gebruikers",
"workspaces": "Werkruimtes",
"licenses": "Licenties"
},
"workspacesAdminTable": {
"allWorkspaces": "Alle werkruimtes",
"id": "ID",
"name": "Naam",
"members": "Leden",
"applications": "Applicaties",
"created": "Aangemaakt",
"seatsTaken": "Plekken bezet",
"usageHelpText": "Wordt 's nachts berekend wanneer de instelling voor het gebruik van werkruimtes is ingeschakeld",
"rowCount": "Aantal rijen",
"freeUsers": "Gratis gebruikers",
"storageUsage": "Opslag gebruikt (MB)"
},
"editWorkspaceContext": {
"delete": "Permanent verwijderen"
},
"deleteWorkspaceModal": {
"title": "Verwijder {name}",
"confirmation": "Weet je zeker dat je de werkruimte: {name} wilt verwijderen?",
"comment": "De werkruimte wordt permanent verwijderd, inclusief de bijbehorende applicaties. Het is niet mogelijk deze actie ongedaan te maken.",
"delete": "Werkruimte {name} verwijderen"
},
"activeUsers": {
"newUsers": "Nieuwe gebruikers",
"activeUsers": "Actieve gebruikers"
},
"usersAdminTable": {
"allUsers": "Alle gebruikers",
"id": "ID",
"username": "Gebruikersnaam",
"name": "Naam",
"workspaces": "Werkruimtes",
"lastLogin": "Laatste login",
"dateJoined": "Ingeschreven",
"active": "Ingeschakeld"
},
"editUserContext": {
"changePassword": "Wachtwoord wijzigen",
"delete": "Permanent verwijderen",
"impersonate": "Imiteer"
},
"changePasswordForm": {
"newPassword": "Nieuw wachtwoord",
"repeatPassword": "Herhaal wachtwoord",
"changePassword": "Wachtwoord wijzigen",
"error": {
"doesntMatch": "Dit veld moet overeenkomen met je wachtwoordveld."
}
},
"userForm": {
"fullName": "Volledige naam",
"email": "E-mail",
"isActive": "Is actief",
"warning": {
"changeEmail": "Als het e-mailadres van deze gebruiker wordt gewijzigd, moet hij/zij dit nieuwe e-mailadres gebruiken wanneer hij/zij zich aanmeldt. Dit moet aan de gebruiker worden gecommuniceerd.",
"inactiveUser": "Wanneer een gebruiker als inactief wordt gemarkeerd, kan deze zich niet meer aanmelden.",
"userStaff": "Door de gebruiker personeel te maken, krijgt deze beheerderstoegang tot alle gebruikers en alle werkruimtes, met de mogelijkheid om de eigen personeelsrechten in te trekken."
},
"error": {
"invalidName": "Voer een geldige volledige naam in. De naam moet langer zijn dan 2 letters en minder dan 150.",
"invalidEmail": "Voer een geldig e-mail adres in."
}
},
"changeUserPasswordModal": {
"changePassword": "Wijzig wachtwoord voor {gebruikersnaam}"
},
"deleteUserModal": {
"title": "Verwijder {gebruikersnaam}",
"confirmation": "Weet je zeker dat je de gebruiker: {name} wilt verwijderen?",
"comment1": "De gebruikersaccount wordt verwijderd, maar de werkruimtes waar die gebruiker lid van is blijven bestaan. De gebruikers werkruimte wordt niet verwijderd, zelfs als deze gebruiker de laatste gebruiker in de werkruimtes is. Door de laatste gebruiker in een werkruimte te verwijderen kan niemand meer toegang krijgen tot die werkruimte.",
"comment2": "Na het verwijderen van een gebruiker is het mogelijk dat een nieuwe gebruiker zich opnieuw aanmeldt met het e-mailadres van de verwijderde gebruiker. Om ervoor te zorgen dat ze zich niet opnieuw kunnen aanmelden, deactiveer de gebruiker in plaats van deze te verwijderen.",
"delete": "Verwijder gebruiker {gebruikersnaam}"
},
"editUserModal": {
"delete": "Gebruiker verwijderen",
"edit": "Bewerk { gebruikersnaam }"
},
"adminDashboard": {
"title": "Dashboard",
"totals": "Totalen",
"totalUsers": "Totaal gebruikers",
"totalWorkspaces": "Totaal werkruimte",
"totalApplications": "Totaal aanvragen",
"newUsers": "Nieuwe gebruikers",
"newUsers24h": "Nieuwe gebruikers laatste 24 uur",
"newUsers7days": "Nieuwe gebruikers laatste 7 dagen",
"newUsers30days": "Nieuwe gebruikers laatste 30 dagen",
"activeUsers": "Actieve gebruikers",
"activeUsers24h": "Actieve gebruikers laatste 24 uur",
"activeUsers7days": "Actieve gebruikers laatste 7 dagen",
"activeUsers30days": "Actieve gebruikers laatste 30 dagen",
"viewAll": "Alles bekijken"
}
}

View file

@ -828,5 +828,109 @@
},
"dataExplorerNode": {
"showMore": "Pokaż więcej powtórzeń"
},
"user": {
"isStaff": "Personel",
"isWorkspaceAdmin": "Jest administratorem grupy",
"active": "Aktywny",
"deactivated": "Dezaktywowany"
},
"adminType": {
"dashboard": "Dashboard",
"users": "Użytkownicy",
"workspaces": "Grupy"
},
"workspacesAdminTable": {
"allWorkspaces": "Wszystkie grupy",
"id": "ID",
"name": "Nazwa",
"members": "Członkowie",
"applications": "Aplikacje",
"created": "Utworzony",
"seatsTaken": "Zajęte miejsca",
"storageUsage": "Wykorzystana pamięć (MB)",
"freeUsers": "Bezpłatni użytkownicy",
"rowCount": "Liczba wierszy",
"usageHelpText": "Obliczane co noc, gdy włączone jest ustawienie śledzenia wykorzystania grupy"
},
"editWorkspaceContext": {
"delete": "Usunąć na stałe"
},
"deleteWorkspaceModal": {
"title": "Usuń {name}",
"confirmation": "Czy na pewno chcesz usunąć grupę: {name}?",
"comment": "Grupa zostanie trwale usunięta, wraz z powiązanymi z nią aplikacjami. Nie ma możliwości cofnięcia tej akcji.",
"delete": "Usuń grupę {name}"
},
"activeUsers": {
"newUsers": "Nowi użytkownicy",
"activeUsers": "Aktywni użytkownicy"
},
"usersAdminTable": {
"allUsers": "Wszystkich użytkowników",
"id": "ID",
"username": "Nazwa użytkownika",
"name": "Nazwa",
"workspaces": "Grupy",
"lastLogin": "Ostatnie logowanie",
"dateJoined": "Zapisany",
"active": "Aktywny"
},
"editUserContext": {
"changePassword": "Zmiana hasła",
"delete": "Trwałe usuwanie",
"impersonate": "Podszywać się pod"
},
"changePasswordForm": {
"newPassword": "Nowe hasło",
"repeatPassword": "Powtórz hasło",
"changePassword": "Zmień hasło",
"error": {
"doesntMatch": "To pole musi być zgodne z Twoim hasłem."
}
},
"userForm": {
"fullName": "Pełne imię i nazwisko",
"email": "E-mail",
"isActive": "Jest aktywny",
"warning": {
"changeEmail": "Zmiana adresu e-mail użytkownika oznacza, że kiedy zaloguje się on do systemu, będzie musiał użyć nowego adresu e-mail. Musi to zostać zakomunikowane temu użytkownikowi.",
"inactiveUser": "Kiedy użytkownik jest oznaczony jako nieaktywny, nie może się zalogować.",
"userStaff": "Nadanie użytkownikowi statusu pracownika daje mu dostęp administratora do wszystkich użytkowników, wszystkich obszarów roboczych i możliwość odebrania uprawnień pracownikom."
},
"error": {
"invalidName": "Podaj prawidłowe imię i nazwisko, musi mieć więcej niż 2 litery i mniej niż 150.",
"invalidEmail": "Proszę wpisać prawidłowy adres e-mail."
}
},
"changeUserPasswordModal": {
"changePassword": "Zmień hasło dla {username}"
},
"deleteUserModal": {
"title": "Usuń {username}",
"confirmation": "Czy na pewno chcesz usunąć użytkownika: {name}?",
"comment1": "Konto użytkownika zostanie usunięte, jednak obszary robocze, których użytkownik jest członkiem, będą nadal istnieć. Obszar roboczy użytkownika nie zostanie usunięty, nawet jeśli ten użytkownik jest ostatnim użytkownikiem w obszarze roboczym. Usunięcie ostatniego użytkownika w obszarze roboczym uniemożliwia każdemu dostęp do tego obszaru roboczego.",
"comment2": "Po usunięciu użytkownika możliwe jest, że nowy użytkownik zarejestruje się ponownie używając adresu e-mail usuniętego użytkownika. Aby uniemożliwić im ponowne zarejestrowanie się, należy dezaktywować użytkownika i nie usuwać go.",
"delete": "Usuń użytkownika {username}"
},
"editUserModal": {
"delete": "Usuń użytkownika",
"edit": "Edytuj { username }"
},
"adminDashboard": {
"title": "Pulpit",
"totals": "Ogółem",
"totalUsers": "Użytkownicy ogółem",
"totalWorkspaces": "Grupy ogółem",
"totalApplications": "Aplikacje ogółem",
"newUsers": "Nowi użytkownicy",
"newUsers24h": "Nowi użytkownicy w ciągu ostatnich 24 godzin",
"newUsers7days": "Nowi użytkownicy w ciągu ostatnich 7 dni",
"newUsers30days": "Nowi użytkownicy w ciągu ostatnich 30 dni",
"activeUsers": "Aktywni użytkownicy",
"activeUsers24h": "Aktywni użytkownicy w ciągu ostatnich 24 godzin",
"activeUsers7days": "Aktywni użytkownicy w ciągu ostatnich 7 dni",
"activeUsers30days": "Aktywni użytkownicy w ciągu ostatnich 30 dni",
"viewAll": "Zobacz wszystkie"
}
}

View file

@ -331,5 +331,103 @@
}
}
}
},
"user": {
"isStaff": "É staff",
"isWorkspaceAdmin": "É administrador do grupo",
"active": "Ativo",
"deactivated": "Desativado"
},
"adminType": {
"dashboard": "Painel",
"users": "Usuários",
"workspaces": "Grupos"
},
"workspacesAdminTable": {
"allWorkspaces": "Todos grupos",
"id": "ID",
"name": "Nome",
"members": "Membros",
"applications": "Aplicações",
"created": "Criado"
},
"editWorkspaceContext": {
"delete": "Excluído permanentemente"
},
"deleteWorkspaceModal": {
"title": "Deletar {name}",
"confirmation": "Tem certeza de que deseja excluir o grupo: {name}?",
"comment": "O grupo será excluído permanentemente, incluindo os aplicativos relacionados. Não é possível desfazer esta ação.",
"delete": "Deletar grupo {name}"
},
"activeUsers": {
"newUsers": "Novos usuários",
"activeUsers": "Usuários ativos"
},
"usersAdminTable": {
"allUsers": "Todos usuários",
"id": "ID",
"username": "Nome de usuário",
"name": "Nome",
"workspaces": "Grupos",
"lastLogin": "Último login",
"dateJoined": "Inscrito",
"active": "Ativo"
},
"editUserContext": {
"changePassword": "Alterar senha",
"delete": "Excluído permanentemente"
},
"changePasswordForm": {
"newPassword": "Nova senha",
"repeatPassword": "Repetir a senha",
"changePassword": "Alterar a senha",
"error": {
"doesntMatch": "Este campo deve corresponder ao seu campo de senha."
}
},
"userForm": {
"fullName": "Nome completo",
"email": "E-mail",
"isActive": "Está ativo",
"warning": {
"changeEmail": "Alterar o endereço de e-mail deste usuário significa que, quando eles fizerem login, deverão usar o novo endereço de e-mail para fazer isso. Isso deve ser comunicado a esse usuário.",
"inactiveUser": "Quando um usuário é marcado como inativo, ele é impedido de entrar.",
"userStaff": "Tornar a equipe do usuário dá a eles acesso de administrador a todos os usuários, todos os grupos e a capacidade de revogar suas próprias permissões de equipe."
},
"error": {
"invalidName": "Insira um nome completo válido, deve ter mais de 2 letras e menos de 150.",
"invalidEmail": "Por favor insira um endereço de e-mail válido."
}
},
"changeUserPasswordModal": {
"changePassword": "Alterar senha para {username}"
},
"deleteUserModal": {
"title": "Deletar{username}",
"confirmation": "Tem certeza de que deseja excluir o usuário: {name}?",
"comment1": "A conta do usuário será excluída, mas os grupos dos quais o usuário é membro continuarão existindo. O grupo de usuários não será excluído, mesmo que este usuário seja o último usuário do grupo. A exclusão do último usuário de um grupo impede que qualquer pessoa possa acessar esse grupo.",
"comment2": "Depois de excluir um usuário, é possível que um novo usuário se inscreva novamente usando o endereço de e-mail do usuário excluído. Para garantir que eles não possam se inscrever novamente, desative o usuário e não o exclua.",
"delete": "Deletar usuário {username}"
},
"editUserModal": {
"delete": "Deletar usuário",
"edit": "Editar { username }"
},
"dashboard": {
"title": "Painel de controle",
"totals": "Totais",
"totalUsers": "Total de usuários",
"totalWorkspaces": "Total de grupos",
"totalApplications": "Total de aplicações",
"newUsers": "Novos usuários",
"newUsers24h": "Novos usuários nas últimas 24 horas",
"newUsers7days": "Novos usuários nos últimos 7 dias",
"newUsers30days": "Novos usuários nos últimos 30 dias",
"activeUsers": "Usuários ativos",
"activeUsers24h": "Usuários ativos nos últimas 24 horas",
"activeUsers7days": "Usuários ativos nos últimos 7 dias",
"activeUsers30days": "Usuários ativos nos últimos 30 dias",
"viewAll": "Visualizar tudo"
}
}

View file

@ -510,5 +510,104 @@
},
"editRoleContext": {
"billableRolesLink": "计费角色文档"
},
"user": {
"isStaff": "工作人员与否",
"isWorkspaceAdmin": "组管理员与否",
"active": "生效的",
"deactivated": "停用的"
},
"adminType": {
"dashboard": "仪表板",
"users": "用户",
"workspaces": "团队"
},
"workspacesAdminTable": {
"allWorkspaces": "所有集体",
"id": "ID",
"name": "名字",
"members": "成员",
"applications": "应用",
"created": "创建"
},
"editWorkspaceContext": {
"delete": "永久删除"
},
"deleteWorkspaceModal": {
"title": "删除 {name}",
"confirmation": "你确定要删除集体:{name}",
"comment": "该组将被永久删除,包括相关应用程序.此操作无法撤销.",
"delete": "删除集体{name}"
},
"activeUsers": {
"newUsers": "新用户",
"activeUsers": "活跃用户"
},
"usersAdminTable": {
"allUsers": "所有用户",
"id": "",
"username": "用户名",
"name": "名字",
"workspaces": "集体",
"lastLogin": "上次登录",
"dateJoined": "注册",
"active": "活跃的"
},
"editUserContext": {
"changePassword": "更改密码",
"delete": "永久删除",
"impersonate": "扮演"
},
"changePasswordForm": {
"newPassword": "新密码",
"repeatPassword": "重复密码",
"changePassword": "更改密码",
"error": {
"doesntMatch": "此字段必须与密码字段匹配."
}
},
"userForm": {
"fullName": "全名",
"email": "邮箱",
"isActive": "活动状态",
"warning": {
"changeEmail": "更改此用户的电子邮件地址意味着当他们登录时,必须使用新的电子邮件地址.这必须与该用户进行沟通.",
"inactiveUser": "当用户被标记为非活跃时,他们将无法登录.",
"userStaff": "让用户成为员工可以让他们对所有用户,所有组进行管理访问,并可以撤销您自己的员工权限."
},
"error": {
"invalidName": "请输入有效的全名,其长度必须大于2个字符,小于150个字符.",
"invalidEmail": "请输入有效的电子邮件地址."
}
},
"changeUserPasswordModal": {
"changePassword": "为{usermane}更改密码"
},
"deleteUserModal": {
"title": "删除{username}",
"confirmation": "你确定要删除这个用户:{name}",
"comment1": "用户帐户将被删除,但用户所属的组将继续存在.即使此用户是组中的最后一个用户,也不会删除用户组.删除组中的最后一个用户将阻止任何人访问该组.",
"comment2": "删除用户后,新用户可以使用删除的用户电子邮件地址再次注册.为了确保他们不能再次注册,请禁用用户并不要删除他们.",
"delete": "删除用户{username}"
},
"editUserModal": {
"delete": "删除用户",
"edit": "编辑{ username }"
},
"adminDashboard": {
"title": "仪表盘",
"totals": "总计",
"totalUsers": "用户总数",
"totalWorkspaces": "组总数",
"totalApplications": "应用程序总数",
"newUsers": "新用户",
"newUsers24h": "最新 24 小时的新用户",
"newUsers7days": "最近7天的新用户",
"newUsers30days": "最近30天的新用户",
"activeUsers": "活跃用户",
"activeUsers24h": "活跃用户持续 24 小时",
"activeUsers7days": "活跃用户最近 7 天",
"activeUsers30days": "活跃用户最近 30 天",
"viewAll": "查看全部"
}
}

View file

@ -5,6 +5,7 @@ import staff from '@baserow/modules/core/middleware/staff'
import workspacesAndApplications from '@baserow/modules/core/middleware/workspacesAndApplications'
import pendingJobs from '@baserow/modules/core/middleware/pendingJobs'
import urlCheck from '@baserow/modules/core/middleware/urlCheck'
import impersonate from '@baserow/modules/core/middleware/impersonate'
/* eslint-disable-next-line */
import Middleware from './middleware'
@ -16,3 +17,4 @@ Middleware.staff = staff
Middleware.workspacesAndApplications = workspacesAndApplications
Middleware.pendingJobs = pendingJobs
Middleware.urlCheck = urlCheck
Middleware.impersonate = impersonate

View file

@ -1,4 +1,4 @@
import UserService from '@baserow_premium/services/admin/users'
import UserService from '@baserow/modules/core/services/admin/users'
/**
* We only want to allow impersonation when a page loads for the first time because

View file

@ -237,6 +237,8 @@ export default function CoreModule(options) {
// middleware.js file has to be changed.
this.options.router.middleware.push('authentication')
this.options.router.middleware.push('impersonate')
// This template will output the contents of the original Iconoir scss file, but
// it changes increases the default stroke with for all icons.
const iconoirCSS = readFileSync(

View file

@ -184,8 +184,8 @@
<script>
import { notifyIf } from '@baserow/modules/core/utils/error'
import ActiveUsers from '@baserow_premium/components/admin/dashboard/charts/ActiveUsers'
import AdminDashboardService from '@baserow_premium/services/admin/dashboard'
import ActiveUsers from '@baserow/modules/core/components/admin/dashboard/charts/ActiveUsers'
import AdminDashboardService from '@baserow/modules/core/services/admin/dashboard'
export default {
components: { ActiveUsers },

View file

@ -3,7 +3,7 @@
</template>
<script>
import UsersAdminTable from '@baserow_premium/components/admin/users/UsersAdminTable'
import UsersAdminTable from '@baserow/modules/core/components/admin/users/UsersAdminTable'
export default {
components: { UsersAdminTable },

View file

@ -3,7 +3,7 @@
</template>
<script>
import WorkspacesAdminTable from '@baserow_premium/components/admin/workspaces/WorkspacesAdminTable'
import WorkspacesAdminTable from '@baserow/modules/core/components/admin/workspaces/WorkspacesAdminTable'
export default {
components: { WorkspacesAdminTable },

View file

@ -18,16 +18,16 @@
@baserow/modules/core/assets/images/empty_workspace_illustration@2x.png 2x
"
/>
<h4>{{ $t('dashboard.noWorkspace') }}</h4>
<h4>{{ $t('adminDashboard.noWorkspace') }}</h4>
<p v-if="$hasPermission('create_workspace')">
{{ $t('dashboard.noWorkspaceDescription') }}
{{ $t('adminDashboard.noWorkspaceDescription') }}
</p>
<span
v-if="$hasPermission('create_workspace')"
ref="createApplicationContextLink2"
>
<Button icon="iconoir-plus" tag="a" @click="$refs.modal.show()">{{
$t('dashboard.addNew')
$t('adminDashboard.addNew')
}}</Button>
</span>
</div>

View file

@ -30,6 +30,9 @@ import {
UploadViaURLUserFileUploadType,
} from '@baserow/modules/core/userFileUploadTypes'
import {
DashboardAdminType,
UsersAdminType,
WorkspacesAdminType,
HealthCheckAdminType,
SettingsAdminType,
} from '@baserow/modules/core/adminTypes'
@ -179,6 +182,9 @@ export default (context, inject) => {
'userFileUpload',
new UploadViaURLUserFileUploadType(context)
)
registry.register('admin', new DashboardAdminType(context))
registry.register('admin', new UsersAdminType(context))
registry.register('admin', new WorkspacesAdminType(context))
registry.register('admin', new SettingsAdminType(context))
registry.register('admin', new HealthCheckAdminType(context))
inject('registry', registry)

View file

@ -63,6 +63,21 @@ export const routes = [
path: '/admin/health',
component: path.resolve(__dirname, 'pages/admin/health.vue'),
},
{
name: 'admin-dashboard',
path: '/admin/dashboard',
component: path.resolve(__dirname, 'pages/admin/dashboard.vue'),
},
{
name: 'admin-users',
path: '/admin/users',
component: path.resolve(__dirname, 'pages/admin/users.vue'),
},
{
name: 'admin-workspaces',
path: '/admin/workspaces',
component: path.resolve(__dirname, 'pages/admin/workspaces.vue'),
},
{
name: 'style-guide',
path: '/style-guide',

Some files were not shown because too many files have changed in this diff Show more