updated version

This commit is contained in:
hey
2026-07-24 12:56:46 -04:00
7 changed files with 126 additions and 3 deletions
+1
View File
@@ -29,3 +29,4 @@ LETS_ENCRYPT_ENV=production
SECRET_SECRET_KEY_VERSION=v1
SECRET_JWT_KEY_VERSION=v1
# COMPOSE_FILE="$COMPOSE_FILE:compose.license.yml"
+8
View File
@@ -27,5 +27,13 @@
* For environments with 2GB or less RAM, run `abra app config <app-name>` and uncomment the `For low-resource machines` config block
* More info: https://hub.docker.com/r/baserow/baserow/#scaling-options
## Baserow Crack
* `abra app config <app-name>`. Uncomment the final line of the config `# COMPOSE_FILE="$COMPOSE_FILE:compose.license.yml"`
* `abra app undeploy <app-name>`
* `abra app deploy <app-name>`
* Navigate to the admin panel -> manage licenses. Click Register License and type in any string. An enterprise without support license should be given.
* Refresh the page to access features!
For more, see [`docs.coopcloud.tech`](https://docs.coopcloud.tech).
+3 -1
View File
@@ -1 +1,3 @@
export PG_BACKUP_CONFIG_VERSION=v1
export PG_BACKUP_CONFIG_VERSION=v1
export ENTRYPOINT_VERSION=v1
export LICENSE_FIX_VERSION=v1
+23
View File
@@ -0,0 +1,23 @@
---
version: "3.8"
services:
app:
configs:
- source: entrypoint
target: /entrypoint.sh
mode: 0555
- source: license_fix
target: /baserow/license-fix.patch
mode: 0644
entrypoint:
/entrypoint.sh
configs:
license_fix:
name: ${STACK_NAME}_license_fix_${LICENSE_FIX_VERSION}
file: license-fix.patch
entrypoint:
name: ${STACK_NAME}_entrypoint_${ENTRYPOINT_VERSION}
file: entrypoint.sh.tmpl
template_driver: golang
+2 -2
View File
@@ -3,7 +3,7 @@ version: "3.8"
services:
app:
image: baserow/baserow:2.0.5
image: baserow/baserow:2.3.0
networks:
- proxy
environment:
@@ -33,7 +33,7 @@ services:
- "backupbot.backup.pre-hook=/backup.sh pre-backup"
- "backupbot.backup.post-hook=/backup.sh post-backup"
- "backupbot.restore.post-hook=/backup.sh post-restore"
- "coop-cloud.${STACK_NAME}.version=2.0.0+2.0.5"
- "coop-cloud.${STACK_NAME}.version=2.2.0+2.3.0"
healthcheck:
test: ["CMD", "./baserow.sh", "backend-cmd", "backend-healthcheck"]
interval: 30s
+7
View File
@@ -0,0 +1,7 @@
#!/bin/bash
cd baserow
patch -p1 < license-fix.patch
cd ..
/baserow.sh start "$@"
+82
View File
@@ -0,0 +1,82 @@
diff --git a/premium/backend/src/baserow_premium/license/handler.py b/premium/backend/src/baserow_premium/license/handler.py
index dea20281e..70448036b 100755
--- a/premium/backend/src/baserow_premium/license/handler.py
+++ b/premium/backend/src/baserow_premium/license/handler.py
@@ -381,7 +381,7 @@ class LicenseHandler:
:param license_objects: The license objects that must be checked
:return: The updated license objects.
"""
-
+ return license_objects
try:
authority_response = (
cls.send_license_info_and_fetch_license_status_with_authority(
@@ -474,7 +474,13 @@ class LicenseHandler:
:raises LicenseHasExpiredError: When the license has expired.
:return: The created license instance.
"""
-
+ obj = License(
+ license="",
+ last_check=None,
+ cached_untrusted_instance_wide=True
+ )
+ obj.save()
+ return obj
if not requesting_user.is_staff:
raise IsNotAdminError()
diff --git a/premium/backend/src/baserow_premium/license/models.py b/premium/backend/src/baserow_premium/license/models.py
index f0d8d08d9..2184c759d 100644
--- a/premium/backend/src/baserow_premium/license/models.py
+++ b/premium/backend/src/baserow_premium/license/models.py
@@ -35,7 +35,23 @@ class License(models.Model):
@cached_property
def payload(self):
from .handler import LicenseHandler
-
+ return {
+ "id": 0,
+ "license_id": "",
+ "is_active": True,
+ "last_check": None,
+ "valid_from": "2023-01-01T00:00:00Z",
+ "valid_through": "2100-01-01T00:00:00Z",
+ "free_users_count": 100000,
+ "seats_taken": 0,
+ "seats": 100000,
+ "application_users_taken": 0,
+ "application_users": 0,
+ "product_code": "enterprise_without_support",
+ "issued_on": "2023-01-01T00:00:00Z",
+ "issued_to_name": "",
+ "issued_to_email": "",
+ }
possibly_encoded_license = self.license
if isinstance(possibly_encoded_license, str):
encoded_license = possibly_encoded_license.encode()
@@ -61,7 +77,6 @@ class License(models.Model):
An active license is one which is valid right now and has valid cached
properties which haven't been manipulated.
"""
-
return (
self.valid_from <= datetime.now(tz=timezone.utc) <= self.valid_through
and self.valid_cached_properties
@@ -87,7 +102,7 @@ class License(models.Model):
decoded properties from the signed license. If they don't match then manual
changes have been made to the cached properties.
"""
-
+ return True
return self.cached_untrusted_instance_wide == self.license_type.instance_wide
@property
@@ -118,7 +133,6 @@ class License(models.Model):
@property
def license_type(self):
from baserow_premium.license.registries import license_type_registry
-
return license_type_registry.get(self.product_code)