You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Removed currentCountQuery from limit service config for customIntegrations
ref BAE-331
ref https://ghost.slack.com/archives/C02G9E68C/p1750776240012249
Since the introduction of the `customIntegrations` limit, it was been treated as a `Flag` limit, which is a simple on/off limit. The query that was assigned to in the config has never been executed and is not found in use anywhere in our repos.
To be able to let customers use a feature, which they have enabled, after we impose a limit for that feature, we're exploring the option to use `currentCountQuery` to overwrite the imposed limit if the feature is already being used. Having a query in the config for custom integrations messes with that idea, besides the fact that it's a pointless query.
At the moment there are four different types of limits that limit service allows to define. These types are:
157
157
1.`flag` - is an "on/off" switch for certain feature. Example usecase: "disable all emails". It's identified by a `disabled: true` property in the "limits" configuration.
158
-
2.`max` - checks if the maximum amount of the resource has been used up.Example usecase: "disable creating a staff user when maximum of 5 has been reached". To configure this limit add `max: NUMBER` to the configuration. The limits that support max checks are: `members`, `staff`, and `customIntegrations`
158
+
2.`max` - checks if the maximum amount of the resource has been used up.Example usecase: "disable creating a staff user when maximum of 5 has been reached". To configure this limit add `max: NUMBER` to the configuration. The limits that support max checks are: `members`, and `staff`
159
159
3.`maxPeriodic` - it's a variation of `max` type with a difference that the check is done over certain period of time. Example usecase: "disable sending emails when the sent emails count has acceded a limit for last billing period". To enable this limit define `maxPeriodic: NUMBER` in the limit configuration and provide a subscription configuration when initializing the limit service instance. The subscription object comes as a separate parameter and has to contain two properties: `startDate` and `interval`, where `startDate` is a date in ISO 8601 format and period is `'month'` (other values like `'year'` are not supported yet)
160
-
4.`allowList` - checks if provided value is defined in configured "allowlist". Example usecase: "disable theme activation if it is not an official theme". To configure this limit define ` allowlist: ['VALUE_1', 'VALUE_2', 'VALUE_N']` property in the "limits" parameter.
160
+
4.`allowList` - checks if provided value is defined in configured "allowlist". Example usecase: "disable theme activation if it is not an official theme". To configure this limit define ` allowlist: ['VALUE_1', 'VALUE_2', 'VALUE_N']` property in the "limits" parameter.
161
161
162
162
### Supported limits
163
-
There's a limited amount of limits that are supported by limit service. The are defined by "key" property name in the "config" module. List of currently supported limit names: `members`, `staff`, `customIntegrations`, `emails`, `customThemes`, `uploads`.
163
+
There's a limited amount of limits that are supported by limit service. The are defined by "key" property name in the "config" module. List of currently supported limit names: `members`, `staff`, `customIntegrations`, `emails`, `customThemes`, `uploads`.
164
164
165
165
All limits can act as `flag` or `allowList` types. Only certain (`members`, `staff`, and`customIntegrations`) can have a `max` limit. Only `emails` currently supports the `maxPeriodic` type of limit.
166
166
@@ -217,6 +217,6 @@ Follow the instructions for the top-level repo.
217
217
218
218
219
219
220
-
# Copyright & License
220
+
# Copyright & License
221
221
222
222
Copyright (c) 2013-2025 Ghost Foundation - Released under the [MIT license](LICENSE).
0 commit comments