feat: Add setting to allow users to send invites (#6488)

This commit is contained in:
Tom Moor
2024-02-03 17:37:39 -08:00
committed by GitHub
parent 9046892864
commit c2b7d01c7d
14 changed files with 121 additions and 64 deletions

View File

@@ -35,6 +35,8 @@ export const TeamsUpdateSchema = BaseSchema.extend({
publicBranding: z.boolean().optional(),
/** Whether viewers should see download options. */
viewersCanExport: z.boolean().optional(),
/** Whether members can invite new people to the team. */
membersCanInvite: z.boolean().optional(),
/** Whether commenting is enabled */
commenting: z.boolean().optional(),
/** The custom theme for the team. */

View File

@@ -47,7 +47,7 @@ const handleTeamUpdate = async (ctx: APIContext<T.TeamsUpdateSchemaReq>) => {
router.post(
"team.update",
rateLimiter(RateLimiterStrategy.TenPerHour),
rateLimiter(RateLimiterStrategy.TenPerMinute),
auth(),
validate(T.TeamsUpdateSchema),
transaction(),
@@ -56,7 +56,7 @@ router.post(
router.post(
"teams.update",
rateLimiter(RateLimiterStrategy.TenPerHour),
rateLimiter(RateLimiterStrategy.TenPerMinute),
auth(),
validate(T.TeamsUpdateSchema),
transaction(),