diff --git a/libs/hscim/CHANGELOG b/libs/hscim/CHANGELOG index 6da7d28ec7e..dd194eba916 100644 --- a/libs/hscim/CHANGELOG +++ b/libs/hscim/CHANGELOG @@ -1,3 +1,17 @@ +0.4.0.6: + - bump dependencies + - re-introduce putUser function accidentally removed in 0.4.0.3 + +0.4.0.4: + - update README + +0.4.0.3: + - drop client function for putUser + - bump ormulu + - bump dependencies + - make delete user idempotent (do not throw 404) + - clean up email address type + 0.4.0: - update dependencies diff --git a/libs/hscim/README.md b/libs/hscim/README.md index 51837f77ee1..296b6133075 100644 --- a/libs/hscim/README.md +++ b/libs/hscim/README.md @@ -3,31 +3,4 @@ This implements part of the [SCIM standard](http://www.simplecloud.info) for identity management. The parts that are currently supported are: - * User schema version 2.0 - -## Building - -This project uses stack. You can install the sample executable with - -```sh -stack install -``` - -## Developing and testing - -This library only implements the schemas and endpoints defined by the -SCIM standard. You will need to implement the actual storage by giving -an instance for the `Persistence` class. - -There's a simple in-memory implementation of this class, which is used -for tests. You can run the tests with the standard stack interface: - -```sh -stack test -``` - -# Contributing - -Before submitting a PR, make sure to install [ormolu](https://github.com/tweag/ormolu) -by doing `stack install ormolu` (we pin the version in our `stack.yaml` file) -and run `make format`. + * User schema version 2.0 (partial) diff --git a/libs/hscim/default.nix b/libs/hscim/default.nix index 85fc2e7cd5e..0e7c11dc089 100644 --- a/libs/hscim/default.nix +++ b/libs/hscim/default.nix @@ -47,7 +47,7 @@ }: mkDerivation { pname = "hscim"; - version = "0.4.0.2"; + version = "0.4.0.6"; src = gitignoreSource ./.; isLibrary = true; isExecutable = true; diff --git a/libs/hscim/hscim.cabal b/libs/hscim/hscim.cabal index 46e6f535ac1..5663e74edc5 100644 --- a/libs/hscim/hscim.cabal +++ b/libs/hscim/hscim.cabal @@ -1,6 +1,6 @@ cabal-version: 1.12 name: hscim -version: 0.4.0.2 +version: 0.4.0.6 synopsis: hscim json schema and server implementation description: The README file will answer all the questions you might have @@ -86,7 +86,7 @@ library aeson >=2.1.2 && <2.2 , aeson-qq >=0.8.4 && <0.9 , attoparsec >=0.14.4 && <0.15 - , base >=4.17.2 && <4.19 + , base >=4.17.2 && <4.21 , bytestring >=0.10.4 && <0.12 , case-insensitive >=1.2.1 && <1.3 , email-validate >=2.3.2 && <2.4 @@ -147,14 +147,14 @@ executable hscim-server -Wunused-packages build-depends: - base - , email-validate + base >=4.18.2 && <4.21 + , email-validate >=2.3.2 && <2.4 , hscim - , network-uri - , stm - , stm-containers - , time - , warp + , network-uri >=2.6.4 && <2.7 + , stm >=2.5.1 && <2.6 + , stm-containers >=1.2.1 && <1.3 + , time >=1.12.2 && <1.13 + , warp >=3 && <3.5 default-language: Haskell2010 @@ -203,25 +203,25 @@ test-suite spec build-tool-depends: hspec-discover:hspec-discover build-depends: - aeson + aeson >=2.1.2 && <2.2 , attoparsec , base , bytestring - , email-validate + , email-validate >=2.3.2 && <2.4 , hedgehog - , hscim + , hscim >=0.4.0 && <0.5 , hspec , hspec-expectations , hspec-wai - , http-types + , http-types >=0.12.4 && <0.13 , hw-hspec-hedgehog , indexed-traversable , microlens , network-uri - , servant + , servant >=0.19 && <0.21 , servant-server , stm-containers - , text + , text >=2.0.2 && <2.1 , wai , wai-extra diff --git a/libs/hscim/src/Web/Scim/Client.hs b/libs/hscim/src/Web/Scim/Client.hs index e736534e56e..c80070fb038 100644 --- a/libs/hscim/src/Web/Scim/Client.hs +++ b/libs/hscim/src/Web/Scim/Client.hs @@ -31,6 +31,7 @@ module Web.Scim.Client getUsers, getUser, postUser, + putUser, patchUser, deleteUser, @@ -133,6 +134,15 @@ postUser :: IO (StoredUser tag) postUser env tok = case users (scimClients env) tok of ((_ :<|> (_ :<|> r)) :<|> (_ :<|> (_ :<|> _))) -> r +putUser :: + (HasScimClient tag) => + ClientEnv -> + Maybe (AuthData tag) -> + UserId tag -> + User tag -> + IO (StoredUser tag) +putUser env tok = case users (scimClients env) tok of ((_ :<|> (_ :<|> _)) :<|> (r :<|> (_ :<|> _))) -> r + patchUser :: (HasScimClient tag) => ClientEnv -> diff --git a/weeder.toml b/weeder.toml index 64669d11e89..6cfce9d5723 100644 --- a/weeder.toml +++ b/weeder.toml @@ -172,6 +172,7 @@ roots = [ # may of the entries here are about general-purpose module "^Web.Scim.Client.patchUser", "^Web.Scim.Client.postGroup", "^Web.Scim.Client.postUser", + "^Web.Scim.Client.putUser", "^Web.Scim.Client.putGroup", "^Web.Scim.Client.resourceTypes", "^Web.Scim.Client.schema",