1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-18 20:09:08 +02:00
Commit Graph

1039 Commits

Author SHA1 Message Date
Thomas Heartman
03dd7b6863
chore: clarify error logs (#3915)
This change makes the logs that happen when we encounter an error a
little bit clearer. It logs the error message before the error ID and
also logs the full serialized message just in case.
2023-06-07 12:11:34 +00:00
Thomas Heartman
24aea5f00e
chore: improve joi errors (#3836)
This PR improves our handling of internal Joi errors, to make them more
sensible to the end user. It does that by providing a better description
of the errors and by telling the user what they value they provided was.

Previous conversion:
```json
{
  "id": "705a8dc0-1198-4894-9015-f1e5b9992b48",
  "name": "BadDataError",
  "message": "\"value\" must contain at least 1 items",
  "details": [
    {
      "message": "\"value\" must contain at least 1 items",
      "description": "\"value\" must contain at least 1 items"
    }
  ]
}
```

New conversion:
```json
{
  "id": "87fb4715-cbdd-48bb-b4d7-d354e7d97380",
  "name": "BadDataError",
  "message": "Request validation failed: your request body contains invalid data. Refer to the `details` list for more information.",
  "details": [
    {
      "description": "\"value\" must contain at least 1 items. You provided [].",
      "message": "\"value\" must contain at least 1 items. You provided []."
    }
  ]
}
```

## Restructuring

This PR moves some code out of `unleash-error.ts` and into a new file.
The purpose of this is twofold:
1. avoid circular dependencies (we need imports from both UnleashError
and BadDataError)
2. carve out a clearer separation of concerns, keeping `unleash-error` a
little more focused.
2023-06-07 08:29:36 +00:00
Thomas Heartman
08834a7250
chore: lower log-level for unexpected errors (#3837)
This change lowers the log level from warning to debug for when we see
unexpected error types.

Right now this triggers for Joi errors, which we still rely on pretty
heavily. Lowering this should clear up logs for most users.
2023-06-07 09:37:40 +02:00
Jaanus Sellin
0efaa346c4
feat: usage on context fields in list (#3906) 2023-06-06 13:59:41 +03:00
Mateusz Kwasniewski
5ec59c6e92
feat: change own password confirmation (#3894) 2023-06-05 11:58:25 +02:00
Mateusz Kwasniewski
b0a003ea58
feat: disable notifications flag (#3874) 2023-05-29 08:28:47 +02:00
Mateusz Kwasniewski
5534e4deeb
fix: remove consecutive slashes (#3882)
A small middleware who will rewrite potential dual slashes to a single slash.
2023-05-27 16:16:51 +00:00
Christopher Kolstad
52904ee038
fix: reject unauthorized client requests (#3881)
If apiTokens are enabled breaks middleware chain with a 401 if no token
is found for requests to client and frontend apis. Previously the
middleware allowed the chain to process.

Removes the regex search for multiple slashes, and instead configures
the apiTokenMiddleware to reject unauthorized requests.
2023-05-27 16:29:54 +02:00
Christopher Kolstad
3d872cf7a2
security: Reject multiple successive slashes in path (#3880) 2023-05-27 14:31:44 +02:00
Jaanus Sellin
f73d36fda3
feat: add usage of segment in list (#3853) 2023-05-26 14:37:00 +03:00
Ivar Conradi Østhus
49722d5c48
fix: use correct event type for maxRevisionId (#3870)
We had a small typo where we looked for `segment-update` event instead
of `segment-updated`. Changed to use the event constant.
2023-05-25 23:00:08 +02:00
Christopher Kolstad
3409b0c5a0
task: Add Unit test result check task (#3695)
After a Team Retro, one of our squads felt like we needed more data on
our test suites. This is the first effort to make our test results
easier to grab. It uses the test-reporter action to add a github check
to our main build and PR builds with our test results.

This at least should make it easier to parse which tests are failing.
However, it does not give us trends. So it does not yet make it easier
to decide which tests are flaky just from a quick view.

---------

Co-authored-by: Gastón Fournier <gaston@getunleash.io>
2023-05-25 11:03:54 +00:00
Mateusz Kwasniewski
78715e3374
docs: maintanance mode impact (#3858) 2023-05-25 08:28:05 +02:00
Mateusz Kwasniewski
5ac575389e
feat: maintenance mode disables scheduler (#3854) 2023-05-24 12:26:54 +02:00
Nuno Góis
ab4ff29407
fix: hide password login when it's disabled (#3851)
https://linear.app/unleash/issue/2-1085/bug-password-based-login-still-shows-on-the-login-page-even-if

Fixes a regression introduced with the changes related with #3633 where
we still show the password login even though it's disabled.

---------

Co-authored-by: Thomas Heartman <thomas@getunleash.io>
2023-05-24 09:39:24 +01:00
Nuno Góis
c0bcc50b28
fix: add confirmation to disable password login (#3829)
https://linear.app/unleash/issue/2-1071/prevent-users-from-disabling-password-authentication-when-there-are-no

Improves the behavior of disabling password based login by adding some
relevant information and a confirmation dialog with a warning. This felt
better than trying to disable the toggle, by still allowing the end
users to make the decision, except now it should be a properly informed
decision with confirmation.


![image](https://github.com/Unleash/unleash/assets/14320932/2ca754d8-cfa2-4fda-984d-0c34b89750f3)

- **Password based administrators**: Admin accounts that have a password
set;
- **Other administrators**: Other admin users that do not have a
password. May be SSO, but may also be users that did not set a password
yet;
- **Admin service accounts**: Service accounts that have the admin root
role. Depending on how you're using the SA this may not necessarily mean
locking yourself out of an admin account, especially if you secured its
token beforehand;
- **Admin API tokens**: Similar to the above. If you secured an admin
API token beforehand, you still have access to all features through the
API;

Each one of them link to the respective page inside Unleash (e.g. users
page, service accounts page, tokens page...);

If you try to disable and press "save", and only in that scenario, you
are presented with the following confirmation dialog:


![image](https://github.com/Unleash/unleash/assets/14320932/5ad6d105-ad47-4d31-a1df-04737aed4e00)
2023-05-23 15:56:34 +01:00
Mateusz Kwasniewski
1dba9d092b
fix: move application logic to service (#3846) 2023-05-23 16:41:52 +02:00
Mateusz Kwasniewski
840ca275cf
feat: disable bulk update env var (#3828) 2023-05-22 13:12:45 +00:00
Mateusz Kwasniewski
e34c9bc0bf
feat: disable bulk toggles flag (#3827) 2023-05-22 13:31:31 +02:00
David Leek
485dab87d4
docs: openapi schema specifications for Projects tag (#3571)
<!-- Thanks for creating a PR! To make it easier for reviewers and
everyone else to understand what your changes relate to, please add some
relevant content to the headings below. Feel free to ignore or delete
sections that you don't think are relevant. Thank you! ❤️ -->

## About the changes
<!-- Describe the changes introduced. What are they and why are they
being introduced? Feel free to also add screenshots or steps to view the
changes if they're visual. -->

Improves the openapi schema specifications for the schemas belonging to
the "Projects" tag.
Expected error codes/http statues, descriptions, and example data

---------

Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai>
Co-authored-by: Thomas Heartman <thomas@getunleash.ai>
2023-05-19 09:07:23 +02:00
Mateusz Kwasniewski
f9409fc0e6
feat: transactional bulk update (#3806) 2023-05-19 08:44:17 +02:00
Nuno Góis
4adc977ba0
fix: properly handle flag resolver variants (#3808)
Variants were not being properly handled in the `flag-resolver`: The
fact that the default value of the variant is not falsy made it so we
never asked the external flag resolver for the value.

This also moves the logic from `Variant | undefined` to `Variant` where
we use the `getDefaultVariant()` helper method to return us a [default
variant](55274e4953/src/variant.ts (L37-L42)).
2023-05-18 17:04:55 +01:00
Nuno Góis
db61a8a40c
feat: message banner (variants) (#3788)
-
https://linear.app/unleash/issue/2-546/fetch-the-payload-from-a-real-feature-flag
-
https://linear.app/unleash/issue/2-547/adapt-ui-to-use-the-feature-flag-information-were-fetching

Tackles the 2 tasks above. 

Adapts our `FlagResolver` logic to support variants, so we can use them
for our message banner project but also anything else in the future.
Also adapts MessageBanner to the new logic.

 - Add support for variants in `FlagResolver`;
 - Adapt `MessageBanner` to a variants flag;
 - Adds `sticky` support for the `MessageBanner`;
- Adds our first variants flag to `uiConfig` and `experimental`:
`messageBanner`;
- Adds a `variant-flag-schema` to make it easy to represent the variant
output that we specify in `uiConfig`;
- Adapts `experimental` to be able to represent default variants while
still maintaining type safety;
- Adds helpers to make it easy to use variants in our project, such as
`getVariantValue` and the `useVariant` hook;
 - Adapts and adds new tests in `flag-resolver.test.ts`;
 
### Notes

- ~~The `as PayloadType` assertions need
https://github.com/Unleash/unleash-client-node/pull/454 since it
includes https://github.com/Unleash/unleash-client-node/pull/452~~
(50ccf60893);
 - ~~Enterprise needs a PR that will follow soon~~;
 
 

![image](https://github.com/Unleash/unleash/assets/14320932/034ff64f-3020-4ed0-863b-ed1fd9190430)
2023-05-18 09:38:59 +01:00
Mateusz Kwasniewski
6b41cf03a0
feat: Basic bulk update implementation (#3794) 2023-05-17 12:20:32 +02:00
Mateusz Kwasniewski
45505d6996
feat: create stubs for bulk toggle (#3792) 2023-05-17 10:21:08 +02:00
Simon Hornby
efbec719de
fix: block adding a root role to a group with a project role (#3775) 2023-05-16 12:11:32 +02:00
Mateusz Kwasniewski
d37bb6a790
feat: base path support for openapi (#3780) 2023-05-16 12:01:47 +02:00
Christopher Kolstad
e5e4d52219
fix: anonymise PII fields in user access if flag is set (#3773)
### What
In the demo when listing possible users to grant access to your project,
we inadvertently expose emails when listing users you can grant access
to. This PR anonymises the access list on the way out.
2023-05-15 14:12:03 +02:00
Gastón Fournier
024c6c1990
chore: add additional methods we want exposed (#3771)
## About the changes
These methods are being used externally as part of our enterprise
package
2023-05-15 10:23:28 +00:00
Thomas Heartman
741135a171
fix: add missing options parameter back in (#3770)
This PR adds the missing serialization of the AuthenticationRequired
response back in. It was mistakenly removed in #3633.

This PR also adds another test to verify that it the options property is
present.
2023-05-15 07:19:55 +00:00
Ivar Conradi Østhus
6c5df9f2c7
feat: improve frontend config freshness to < 1s (#3749)
This PR reuses the revision Id information from the "optimal 304 for
server SDKs" to improve the freshness of the frontend API config data.

In addition it allows us to reduce the polling (and eventually remove it
when we are confident).

---------

Co-authored-by: Gastón Fournier <gaston@getunleash.io>
2023-05-12 17:52:11 +00:00
David Leek
534e1f1378
chore: add another migration that remigrates the proper way (#3719)
## About the changes
<!-- Describe the changes introduced. What are they and why are they
being introduced? Feel free to also add screenshots or steps to view the
changes if they're visual. -->

Adds a migration that renames `token_name` back to `username`, then adds
a new optional column named `token_name`

## Discussion points
<!-- Anything about the PR you'd like to discuss before it gets merged?
Got any questions or doubts? -->

I've added fallbacks for resolving username/tokenname on insert and on
making rows from results.
But this adds another column renaming, which is worth discussing
properly
2023-05-11 15:33:04 +02:00
Thomas Heartman
9943179393
Clean up old errors (#3633)
This PR attempts to improve the error handling introduced in #3607.

## About the changes

## **tl;dr:**
- Make `UnleashError` constructor protected
- Make all custom errors inherit from `UnleashError`.
- Add tests to ensure that all special error cases include their
relevant data
- Remove `PasswordMismatchError` and `BadRequestError`. These don't
exist.
- Add a few new error types: `ContentTypeError`, `NotImplementedError`,
`UnauthorizedError`
- Remove the `...rest` parameter from error constructor
- Add an unexported `GenericUnleashError` class
- Move OpenAPI conversion function to `BadDataError` clas
- Remove explicit `Error.captureStackTrace`. This is done automatically.
- Extract `getPropFromString` function and add tests

### **In a more verbose fashion**

The main thing is that all our internal errors now inherit
from`UnleashError`. This allows us to simplify the `UnleashError`
constructor and error handling in general while still giving us the
extra benefits we added to that class. However, it _does_ also mean that
I've had to update **all** existing error classes.

The constructor for `UnleashError` is now protected and all places that
called that constructor directly have been updated. Because the base
error isn't available anymore, I've added three new errors to cover use
cases that we didn't already have covered: `NotImplementedError`,
`UnauthorizedError`, `ContentTypeError`. This is to stay consistent in
how we report errors to the user.

There is also an internal class, `GenericUnleashError` that inherits
from the base error. This class is only used in conversions for cases
where we don't know what the error is. It is not exported.

In making all the errors inherit, I've also removed the `...rest`
parameter from the `UnleashError` constructor. We don't need this
anymore.

Following on from the fixes with missing properties in #3638, I have
added tests for all errors that contain extra data.

Some of the error names that were originally used when creating the list
don't exist in the backend. `BadRequestError` and
`PasswordMismatchError` have been removed.

The `BadDataError` class now contains the conversion code for OpenAPI
validation errors. In doing so, I extracted and tested the
`getPropFromString` function.

### Main files

Due to the nature of the changes, there's a lot of files to look at. So
to make it easier to know where to turn your attention:

The changes in `api-error.ts` contain the main changes: protected
constructor, removal of OpenAPI conversion (moved into `BadDataError`.

`api-error.test.ts` contains tests to make sure that errors work as
expected.

Aside from `get-prop-from-string.ts` and the tests, everything else is
just the required updates to go through with the changes.

## Discussion points

I've gone for inheritance of the Error type over composition. This is in
large part because throwing actual Error instances instead of just
objects is preferable (because they collect stack traces, for instance).
However, it's quite possible that we could solve the same thing in a
more elegant fashion using composition.

## For later / suggestions for further improvements

The `api-error` files still contain a lot of code. I think it might be
beneficial to break each Error into a separate folder that includes the
error, its tests, and its schema (if required). It would help decouple
it a bit.

We don't currently expose the schema anywhere, so it's not available in
the openapi spec. We should look at exposing it too.

Finally, it would be good to go through each individual error message
and update each one to be as helpful as possible.
2023-05-11 11:10:57 +02:00
David Leek
546f9953a7
docs: openapi schema for PATs (#3605)
<!-- Thanks for creating a PR! To make it easier for reviewers and
everyone else to understand what your changes relate to, please add some
relevant content to the headings below. Feel free to ignore or delete
sections that you don't think are relevant. Thank you! ❤️ -->

## About the changes
<!-- Describe the changes introduced. What are they and why are they
being introduced? Feel free to also add screenshots or steps to view the
changes if they're visual. -->

OpenAPI schema updates for Personal Access Tokens, http statuses,
property types and examples, return types

---------

Co-authored-by: Nuno Góis <github@nunogois.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Thomas Heartman <thomas@getunleash.ai>
2023-05-11 09:11:17 +02:00
Christopher Kolstad
eaacb979d6
fix: Removed CR on variants flag (it's GA) (#3738)
This PR removes the usage of crOnVariants flag, but keeps the behaviour,
so CR are now enabled on variants.

---------

Co-authored-by: Nuno Góis <github@nunogois.com>
2023-05-10 13:46:41 +00:00
Christopher Kolstad
af3944bd75
fix: log missing user at warn level (#3735)
When using PATs if the user that the PAT is for has been removed, we
currently log the missing user at ERROR level. Since this is not
something our SREs can fix, this PR downgrades the NotFoundError to
WARN, instead of ERROR.
2023-05-10 13:31:42 +02:00
Nuno Góis
72eba37cec
test: add anonymise unit tests (#3722)
Adds unit tests to `anonymise` functions. 

See:
https://github.com/Unleash/unleash/pull/3683#pullrequestreview-1418223563
2023-05-09 14:20:39 +01:00
andreas-unleash
5229c44dcb
fix: bypass change requests when unprotected deleting (#3720)
<!-- Thanks for creating a PR! To make it easier for reviewers and
everyone else to understand what your changes relate to, please add some
relevant content to the headings below. Feel free to ignore or delete
sections that you don't think are relevant. Thank you! ❤️ -->

## About the changes
<!-- Describe the changes introduced. What are they and why are they
being introduced? Feel free to also add screenshots or steps to view the
changes if they're visual. -->

<!-- Does it close an issue? Multiple? -->
Closes #

<!-- (For internal contributors): Does it relate to an issue on public
roadmap? -->
<!--
Relates to [roadmap](https://github.com/orgs/Unleash/projects/10) item:
#
-->

### Important files
<!-- PRs can contain a lot of changes, but not all changes are equally
important. Where should a reviewer start looking to get an overview of
the changes? Are any files particularly important? -->


## Discussion points
<!-- Anything about the PR you'd like to discuss before it gets merged?
Got any questions or doubts? -->

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-05-09 14:18:21 +03:00
andreas-unleash
b132cce986
fix: project api token type to lowercase (#3717)
<!-- Thanks for creating a PR! To make it easier for reviewers and
everyone else to understand what your changes relate to, please add some
relevant content to the headings below. Feel free to ignore or delete
sections that you don't think are relevant. Thank you! ❤️ -->

## About the changes
<!-- Describe the changes introduced. What are they and why are they
being introduced? Feel free to also add screenshots or steps to view the
changes if they're visual. -->

<!-- Does it close an issue? Multiple? -->
Closes #

<!-- (For internal contributors): Does it relate to an issue on public
roadmap? -->
<!--
Relates to [roadmap](https://github.com/orgs/Unleash/projects/10) item:
#
-->

### Important files
<!-- PRs can contain a lot of changes, but not all changes are equally
important. Where should a reviewer start looking to get an overview of
the changes? Are any files particularly important? -->


## Discussion points
<!-- Anything about the PR you'd like to discuss before it gets merged?
Got any questions or doubts? -->

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-05-09 09:22:21 +00:00
Nuno Góis
b013d4286c
fix: log project access events (#3683)
https://linear.app/unleash/issue/2-992/register-event-when-granting-access-to-a-project

 - Correctly registers a new `project-access-added` event;
- Adds an anonymization method that supports anonymizing objects,
recursively searching for keys to anonymize;
- Fixes the event label used by `ProjectUserUpdateRoleEvent` to be
`PROJECT_USER_ROLE_CHANGED`;


![image](https://user-images.githubusercontent.com/14320932/236216227-bf6e5dff-f509-48a4-ba7c-9f37e23e87c0.png)
2023-05-09 11:13:38 +02:00
Simon Hornby
3ed4aeba5c
chore: expand default segment limits to 1000 (#3710)
This expands the segment limits to 1000, this should have no impact on
OSS since this feature isn't exposed. This is overridden to 250 in
hosted `pro` instances and 1000 in hosted `enterprise` customers. This
only affects self hosted enterprise instances
2023-05-08 14:44:48 +02:00
andreas-unleash
3c8b766ea6
fix: Add default value for shouldActivateDisabledStrategies (#3711)
<!-- Thanks for creating a PR! To make it easier for reviewers and
everyone else to understand what your changes relate to, please add some
relevant content to the headings below. Feel free to ignore or delete
sections that you don't think are relevant. Thank you! ❤️ -->

## About the changes
<!-- Describe the changes introduced. What are they and why are they
being introduced? Feel free to also add screenshots or steps to view the
changes if they're visual. -->

<!-- Does it close an issue? Multiple? -->
Closes #

<!-- (For internal contributors): Does it relate to an issue on public
roadmap? -->
<!--
Relates to [roadmap](https://github.com/orgs/Unleash/projects/10) item:
#
-->

### Important files
<!-- PRs can contain a lot of changes, but not all changes are equally
important. Where should a reviewer start looking to get an overview of
the changes? Are any files particularly important? -->


## Discussion points
<!-- Anything about the PR you'd like to discuss before it gets merged?
Got any questions or doubts? -->

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-05-08 14:56:42 +03:00
andreas-unleash
83bb9b1656
Feat: enable toggle dialog (#3686)
<!-- Thanks for creating a PR! To make it easier for reviewers and
everyone else to understand what your changes relate to, please add some
relevant content to the headings below. Feel free to ignore or delete
sections that you don't think are relevant. Thank you! ❤️ -->
- Creates a dialog when the feature has ONLY disabled strategies and the
environment in turned on
- Adds functionality to either `enable` the strategies or add the
default one (if a project specific default strategy is set, uses it)
## About the changes
<!-- Describe the changes introduced. What are they and why are they
being introduced? Feel free to also add screenshots or steps to view the
changes if they're visual. -->

<!-- Does it close an issue? Multiple? -->



Uploading Screen Recording 2023-05-05 at 17.40.48.mov…



Closes #

<!-- (For internal contributors): Does it relate to an issue on public
roadmap? -->
<!--
Relates to [roadmap](https://github.com/orgs/Unleash/projects/10) item:
#
-->

### Important files
<!-- PRs can contain a lot of changes, but not all changes are equally
important. Where should a reviewer start looking to get an overview of
the changes? Are any files particularly important? -->


## Discussion points
<!-- Anything about the PR you'd like to discuss before it gets merged?
Got any questions or doubts? -->

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-05-08 11:42:26 +03:00
andreas-unleash
a8936a13c3
Feat: default strategy UI (#3682)
<!-- Thanks for creating a PR! To make it easier for reviewers and
everyone else to understand what your changes relate to, please add some
relevant content to the headings below. Feel free to ignore or delete
sections that you don't think are relevant. Thank you! ❤️ -->
- Removed `strategyTitle` and `strategyDisable` flags. Unified under
`strategyImprovements` flag
- Implements the default strategy UI
- Bug fixes

## About the changes
<!-- Describe the changes introduced. What are they and why are they
being introduced? Feel free to also add screenshots or steps to view the
changes if they're visual. -->

<!-- Does it close an issue? Multiple? -->
Closes #
[1-875](https://linear.app/unleash/issue/1-875/default-strategy-frontend)

<!-- (For internal contributors): Does it relate to an issue on public
roadmap? -->
<!--
Relates to [roadmap](https://github.com/orgs/Unleash/projects/10) item:
#
-->
![Screenshot 2023-05-04 at 11 21
05](https://user-images.githubusercontent.com/104830839/236149232-84601829-1327-42af-9527-5cc15196517a.png)

### Important files
<!-- PRs can contain a lot of changes, but not all changes are equally
important. Where should a reviewer start looking to get an overview of
the changes? Are any files particularly important? -->


## Discussion points
<!-- Anything about the PR you'd like to discuss before it gets merged?
Got any questions or doubts? -->

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-05-05 14:32:44 +03:00
Jaanus Sellin
50fe3ebcaf
feat: metrics for variants (#3685) 2023-05-05 11:10:54 +03:00
Gastón Fournier
149bc8aab2
chore: remove optimal 304 flag (#3665)
## About the changes
This PR removes the optimal304 flag after being tested in production.
We're keeping the existing configuration that allows users to disable
cache mainly because it's useful for testing.
2023-05-05 09:18:04 +02:00
Mateusz Kwasniewski
108e15940e
fix: don't create duplicate tags on import (#3688) 2023-05-04 22:19:00 +02:00
David Leek
f35d9390c1
chore: deprecate username on api-tokens (#3616)
<!-- Thanks for creating a PR! To make it easier for reviewers and
everyone else to understand what your changes relate to, please add some
relevant content to the headings below. Feel free to ignore or delete
sections that you don't think are relevant. Thank you! ❤️ -->

## About the changes
<!-- Describe the changes introduced. What are they and why are they
being introduced? Feel free to also add screenshots or steps to view the
changes if they're visual. -->

This deprecates the `username` properties on api-token schemas, and adds
a `tokenName` property.
DB field `username` has been renamed to `token_name`, migration added
for the rename.
Both `username` and `tokenName` can be used when consuming the service,
but only one of them.

## Discussion points
<!-- Anything about the PR you'd like to discuss before it gets merged?
Got any questions or doubts? -->

There's a couple of things I'd like to get opinions on and discuss:
- Frontend still uses the deprecated `username` property
- ApiTokenSchema is used both for input and output of `Create`
controller endpoints and should be split out into separate schemas. I'll
set up a task for this

---------

Co-authored-by: Thomas Heartman <thomas@getunleash.ai>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-05-04 09:56:00 +02:00
Nuno Góis
fb999e6a74
fix: anonymize email in event payload (#3672)
Context:
https://unleash-internal.slack.com/archives/C048ELND3QD/p1683097636083299

We should also anonymize email fields in `data` and `preData` of event
objects when `anonymiseEventLog` is enabled.


![image](https://user-images.githubusercontent.com/14320932/235862643-b59a3f8d-9bc6-4b22-816b-9bc7a0577bfc.png)
2023-05-03 09:46:33 +00:00
andreas-unleash
d45f81ab02
fix: set feature.enabled to false when all strategies are deactivated (#3655)
<!-- Thanks for creating a PR! To make it easier for reviewers and
everyone else to understand what your changes relate to, please add some
relevant content to the headings below. Feel free to ignore or delete
sections that you don't think are relevant. Thank you! ❤️ -->
set feature.enabled to false when all strategies are deactivated
## About the changes
<!-- Describe the changes introduced. What are they and why are they
being introduced? Feel free to also add screenshots or steps to view the
changes if they're visual. -->

<!-- Does it close an issue? Multiple? -->
Closes #

<!-- (For internal contributors): Does it relate to an issue on public
roadmap? -->
<!--
Relates to [roadmap](https://github.com/orgs/Unleash/projects/10) item:
#
-->

### Important files
<!-- PRs can contain a lot of changes, but not all changes are equally
important. Where should a reviewer start looking to get an overview of
the changes? Are any files particularly important? -->


## Discussion points
<!-- Anything about the PR you'd like to discuss before it gets merged?
Got any questions or doubts? -->

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
Co-authored-by: Prabodh Meshram <prabodh.meshram7@gmail.com>
2023-05-02 21:33:14 +03:00