Skip to content

Commit

Permalink
Merge branch 'master' into 646
Browse files Browse the repository at this point in the history
  • Loading branch information
Zwiterrion committed Sep 25, 2024
2 parents 545a8ee + 730b150 commit e2d846e
Show file tree
Hide file tree
Showing 187 changed files with 15,397 additions and 6,729 deletions.
38 changes: 38 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -609,3 +609,41 @@ We'd like to thank all the contributors who worked on this release!

- Create testing key with otorshi is broken [#698](https://github.com/MAIF/daikoku/issues/698)

## [v17.4.0] - 2024-08-05

## :star: New Features

- use color theme for dark mode [#645](https://github.com/MAIF/daikoku/issues/645)
- Add tutorial to setup authentication [#644](https://github.com/MAIF/daikoku/issues/644)
- Support AsyncAPI v2 [#511](https://github.com/MAIF/daikoku/issues/511)

## :beetle: Bug Fixes

- Update aggregated subscription delete authorized entities in otoroshi [#722](https://github.com/MAIF/daikoku/issues/722)
- Error Api name already exists when creating a new version by admin-api [#719](https://github.com/MAIF/daikoku/issues/719)
- unknown Apikey authorized entities [#709](https://github.com/MAIF/daikoku/issues/709)
- Lack of translation [#700](https://github.com/MAIF/daikoku/issues/700)
- API testing UI is broken [#699](https://github.com/MAIF/daikoku/issues/699)

## [v17.5.0] - 2024-09-17

## :star: New Features

- Hide personal teams if security prohibits personal teams from subscribing [#740](https://github.com/MAIF/daikoku/issues/740)
- add a control for environment name for subscription aggregation [#714](https://github.com/MAIF/daikoku/issues/714)
- Add a way to disable part of aggragation [#711](https://github.com/MAIF/daikoku/issues/711)
- Allow to transfer subscriptions ownership [#708](https://github.com/MAIF/daikoku/issues/708)
- Add HTTP links everywhere, it’s unusable in practice sometimes. [#696](https://github.com/MAIF/daikoku/issues/696)
- display S3 bucket example to avoid S3Exception [#622](https://github.com/MAIF/daikoku/issues/622)

## :beetle: Bug Fixes

- User can't go in home page from daikoku [#741](https://github.com/MAIF/daikoku/issues/741)
- No UI [#735](https://github.com/MAIF/daikoku/issues/735)
- Crash on notification page in case of unknown team in action property [#720](https://github.com/MAIF/daikoku/issues/720)
- [productor view]subscription table is not refresh after enable/disable apikey [#715](https://github.com/MAIF/daikoku/issues/715)
- Update parent subscription in aggregation does not update childs [#710](https://github.com/MAIF/daikoku/issues/710)
- 2FA inputs don't work if code begin with 0 [#701](https://github.com/MAIF/daikoku/issues/701)
- translation for validation step [#697](https://github.com/MAIF/daikoku/issues/697)
- Delete Tag, delete all the tags [#694](https://github.com/MAIF/daikoku/issues/694)

94 changes: 26 additions & 68 deletions cli/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 14 additions & 6 deletions daikoku/app/controllers/AdminApiController.scala
Original file line number Diff line number Diff line change
Expand Up @@ -322,15 +322,17 @@ class StateAdminApiController(
}

def reset() =
DaikokuApiAction.async { _ =>
DaikokuApiAction.async { ctx =>
(for {
_ <- EitherT.cond[Future][AppError, Unit](
env.config.isDev || env.config.mode == DaikokuMode.Test,
(),
AppError.SecurityError("Action not avalaible")
)
_ <- EitherT.liftF[Future, AppError, Unit](env.dataStore.clear())
_ <- EitherT.liftF[Future, AppError, Done](env.initDatastore())
_ <- EitherT.liftF[Future, AppError, Done](
env.initDatastore(ctx.request.getQueryString("path"))
)
} yield Ok(Json.obj("done" -> true)))
.leftMap(_.render())
.merge
Expand Down Expand Up @@ -526,11 +528,15 @@ class ApiAdminApiController(
.findOne(
Json.obj(
"_id" -> Json.obj("$ne" -> entity.id.asJson),
"name" -> entity.name,
) ++ entity.parent.map(p => Json.obj("_id" -> p.asJson)).getOrElse(Json.obj())
"name" -> entity.name
) ++ entity.parent
.map(p => Json.obj("_id" -> p.asJson))
.getOrElse(Json.obj())
)
.map {
case Some(api) if entity.parent.contains(api.id) || api.parent.contains(entity.id) =>
case Some(api)
if entity.parent.contains(api.id) || api.parent
.contains(entity.id) =>
Right(())
case Some(_) =>
Left(AppError.ParsingPayloadError("Api name already exists"))
Expand All @@ -545,7 +551,9 @@ class ApiAdminApiController(
Json.obj(
"_id" -> Json.obj("$ne" -> entity.id.asJson),
"name" -> entity.name
) ++ entity.parent.map(p => Json.obj("_id" -> p.asJson)).getOrElse(Json.obj())
) ++ entity.parent
.map(p => Json.obj("_id" -> p.asJson))
.getOrElse(Json.obj())
)
.map {
case None =>
Expand Down
Loading

0 comments on commit e2d846e

Please sign in to comment.