Skip to content

Token prefixes: Fix issue when resetting feed tokens in rake task

What does this MR do and why?

When resetting all feed tokens using the rake task tokens:reset_all_feed, the instance prefix for tokens was ignored. This MR fixes that behaviour.

🛠️ with ❤️ at Siemens

References

How to set up and validate locally

  1. Enable feature flag via rails c:
Feature.enable(:custom_prefix_for_all_token_types)

BEFORE applying this MR:

  1. Check your current feed token: https://gdk.test:3443/-/user_settings/personal_access_tokens It should not contain an instance prefix yet.
  2. Now, change the instance wide token prefix: Admin area > General > Account and limit > Instance token prefix, e.g. to mycustomprefix
  3. Execute the rake task: bundle exec rake tokens:reset_all_feed
  4. Check your feed token again - it should have been changed, but does not contain the instance wide token prefix.

AFTER applying this MR

Same steps as above, however in step 5 you should now see that the feed token contains the instance wide token prefix.

MR acceptance checklist

MR Checklist ( @nwittstruck)

Edited by Nicholas Wittstruck

Merge request reports

Loading