Skip to content

Commit

Permalink
Improve licence checking (#500)
Browse files Browse the repository at this point in the history
  • Loading branch information
antoinejaussoin authored Mar 15, 2023
1 parent 3658c4a commit 706ff13
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions backend/src/security/is-licenced.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import fetch from 'node-fetch';
import wait from '../utils.js';
import { LicenceMetadata } from './../types.js';
import { comparePassword, decrypt } from '../encryption.js';
import chalkTemplate from 'chalk-template';

let licenced: LicenceMetadata | null = null;

Expand Down Expand Up @@ -77,6 +78,11 @@ async function isLicencedBase(): Promise<LicenceMetadata | null> {
// Checking hardcoded licence as a last resort
const hardcodedLicence = await checkHardcodedLicence(licenceKey);

if (hardcodedLicence) {
console.log(chalkTemplate`📝 {blue Your licence is {red hardcoded}.}`);
return hardcodedLicence;
}

const payload: SelfHostedCheckPayload = { key: licenceKey };
try {
const response = await fetch(
Expand Down
2 changes: 1 addition & 1 deletion marketing/public/locales/de/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"heading": "Was andere über uns sagen",
"1": {
"author": "Frank Becker",
"designation": "Lieferteam Gruppe & Holding/Transport - Deutsche Bahn",
"designation": "Delivery Team Group & Holding/Transport - Deutsche Bahn",
"quote": "Der einfachste Weg, viele Retrospektiven mit vielen Teams zu verwalten und sich selbst zu optimieren. Einwandfreie Integration mit AzureAD und einfache Migration von lokalen Benutzern zu AzureAD-Benutzern. Schöne und nicht zu überladene Funktionen."
}
},
Expand Down

0 comments on commit 706ff13

Please sign in to comment.