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.

This is ok: we can still keep backoffice from being able to
enable legalhold by turning it off permanently in the options
file in galley.
  • Loading branch information
fisx committed Sep 11, 2019
1 parent ed75524 commit 13bcf62
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 @@ -299,6 +297,30 @@ 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.docLegalHoldStatus
Doc.response 200 "Legalhold status" Doc.end
Doc.returns Doc.bool'

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

document "PUT" "setLegalholdStatus" $ do
summary "Disable / enable legalhold feature for team"
Doc.parameter Doc.Path "tid" Doc.bytes' $
description "Team ID"
Doc.body Doc.docLegalHoldStatus $
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 13bcf62

Please sign in to comment.