mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-28 00:06:53 +01:00
e889d8e29c
This adds support for multi project tokens to be created. Backward compatibility is handled at 3 different layers here: - The API is made backwards compatible though a permissive data type that accepts either a project?: string or projects?: string[] property, validation is done through JOI here, which ensures that projects and project are not set together. In the case of neither, this defaults to the previous default of ALL_PROJECTS - The service layer method to handle adding tokens has been made tolerant to either of the above case and has been deprecated, a new method supporting only the new structure of using projects has been added - Existing compatibility for consumers of Unleash as a library should not be affected either, the ApiUser constructor is now tolerant to the the first input and will internally map to the new cleaned structure |
||
---|---|---|
.. | ||
api-token-schema.test.ts | ||
api-token-schema.ts | ||
constraint-value-types.test.ts | ||
constraint-value-types.ts | ||
feature-schema.test.ts | ||
feature-schema.ts | ||
project-schema.ts | ||
role-schema.test.ts | ||
role-schema.ts |