Skip to content

Commit

Permalink
Revert "Block legalhold on stern / backoffice. (#823)"
Browse files Browse the repository at this point in the history
This reverts commit 88cfe14 and
unblocks the legalhold feature.
  • Loading branch information
fisx committed Sep 5, 2019
1 parent eb68632 commit c6c82e0
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions tools/stern/src/Stern/API.hs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
{-# LANGUAGE ViewPatterns #-}
{-# LANGUAGE LambdaCase #-}

{-# OPTIONS_GHC -Wno-unused-binds #-}

module Stern.API (start) where

import Imports hiding (head)
Expand Down Expand Up @@ -298,6 +296,29 @@ sitemap = do

-- feature flags

get "/teams/:tid/features/legalhold" (continue (liftM json . Intra.getLegalholdStatus)) $
capture "tid"

document "GET" "getLegalholdStatus" $ do
summary "Shows whether legalhold feature is enabled for team"
Doc.parameter Doc.Path "tid" Doc.bytes' $
description "Team ID"
Doc.returns Doc.bool'
Doc.response 200 "Legalhold status" Doc.end

put "/teams/:tid/features/legalhold" (continue setLegalholdStatus) $
contentType "application" "json"
.&. capture "tid"
.&. jsonRequest @(Tagged "legalhold" Bool)

document "PUT" "setLegalholdStatus" $ do
summary "Disable / enable legalhold feature for team"
Doc.parameter Doc.Path "tid" Doc.bytes' $
description "Team ID"
Doc.body Doc.bool' $
Doc.description "JSON body"
Doc.response 200 "Legalhold status" Doc.end

get "/teams/:tid/features/sso" (continue (liftM json . Intra.getSSOStatus)) $
capture "tid"

Expand Down

0 comments on commit c6c82e0

Please sign in to comment.