mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) add minimal support for activation keys
Summary: For grist-ee, expect an activation key in environment variable `GRIST_ACTIVATION` or in a file pointed to by `GRIST_ACTIVATION_FILE`. In absence of key, start a 30-day trial, during which a banner is shown. Once trial expires, installation goes into document-read-only mode. Test Plan: added a test Reviewers: dsagal Reviewed By: dsagal Subscribers: jarek Differential Revision: https://phab.getgrist.com/D3426
This commit is contained in:
17
app/gen-server/entity/Activation.ts
Normal file
17
app/gen-server/entity/Activation.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import {BaseEntity, Column, Entity, PrimaryColumn} from "typeorm";
|
||||
|
||||
@Entity({name: 'activations'})
|
||||
export class Activation extends BaseEntity {
|
||||
|
||||
@PrimaryColumn()
|
||||
public id: string;
|
||||
|
||||
@Column({name: 'key', type: 'text', nullable: true})
|
||||
public key: string|null;
|
||||
|
||||
@Column({name: 'created_at', default: () => "CURRENT_TIMESTAMP"})
|
||||
public createdAt: Date;
|
||||
|
||||
@Column({name: 'updated_at', default: () => "CURRENT_TIMESTAMP"})
|
||||
public updatedAt: Date;
|
||||
}
|
||||
Reference in New Issue
Block a user