hunk.code_window: 	b64 "encoding/base64"
   	"net/http"
   	"strings"
   	"github.com/mattermost/mattermost-server/app"
   	"github.com/mattermost/mattermost-server/mlog"
   	"github.com/mattermost/mattermost-server/model"
   )
  
hunk.labels: keep keep keep keep replace keep keep keep
hunk.file_path: web/saml.go
hunk.type: replace
file: // Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved.
  // See License.txt for license information.
  
  package api4
  
  import (
  	"net/http"
  )
  
  func (api *API) InitDataRetention() {
  	api.BaseRoutes.DataRetention.Handle("/policy", api.ApiSessionRequired(getPolicy)).Methods("GET")
  }
  
  func getPolicy(c *Context, w http.ResponseWriter, r *http.Request) {
  
  	// No permission check required.
  
  	if policy, err := c.App.GetDataRetentionPolicy(); err != nil {
  		c.Err = err
  		return
  	} else {
  		w.Write([]byte(policy.ToJson()))
  	}
  }
  