mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) add free team site product
Summary: This adds a Feature object that is an approximation of what we plan for free team sites. It includes restrictions that are not yet implemented, and an endpoint for testing. Test Plan: added a test Reviewers: georgegevoian Reviewed By: georgegevoian Differential Revision: https://phab.getgrist.com/D3243
This commit is contained in:
@@ -72,11 +72,15 @@ export function addOrg(
|
||||
dbManager: HomeDBManager,
|
||||
userId: number,
|
||||
props: Partial<OrganizationProperties>,
|
||||
options?: {
|
||||
planType?: 'free'
|
||||
}
|
||||
): Promise<number> {
|
||||
return dbManager.connection.transaction(async manager => {
|
||||
const user = await manager.findOne(User, userId);
|
||||
if (!user) { return handleDeletedUser(); }
|
||||
const query = await dbManager.addOrg(user, props, {
|
||||
...options,
|
||||
setUserAsOwner: false,
|
||||
useNewPlan: true
|
||||
}, manager);
|
||||
|
||||
Reference in New Issue
Block a user