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 Aug 8, 2019
1 parent 88cfe14 commit dcddbd6
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 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 @@ -297,6 +295,30 @@ sitemap = do

-- feature flags

get "/teams/:tid/features/legalhold" (continue 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
Doc.returns Doc.bool'

put "/teams/:tid/features/legalhold" (continue setLegalholdStatus) $
contentType "application" "json"
.&. capture "tid"
.&. jsonRequest @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 getSSOStatus) $
capture "tid"

Expand Down

0 comments on commit dcddbd6

Please sign in to comment.