From c8285185a91c48f9b6db866b65b293cb9eceeb65 Mon Sep 17 00:00:00 2001 From: Corey Hulen Date: Tue, 10 May 2016 09:54:11 -0700 Subject: PLT-2806 sending websocket when adding user to team (#2953) * PLT-2806 sending websocket when adding user to team * Fixing config file --- api/team.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'api') diff --git a/api/team.go b/api/team.go index 6db8bc245..605aa590b 100644 --- a/api/team.go +++ b/api/team.go @@ -275,6 +275,9 @@ func JoinUserToTeam(team *model.Team, user *model.User) *model.AppError { RemoveAllSessionsForUserId(user.Id) InvalidateCacheForUser(user.Id) + // This message goes to every channel, so the channelId is irrelevant + PublishAndForget(model.NewMessage("", "", user.Id, model.ACTION_NEW_USER)) + return nil } -- cgit v1.2.3-1-g7c22 From 720222f3a65fbe0de53aec84730af5ba37794c42 Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Wed, 11 May 2016 08:04:01 -0400 Subject: Removing export route (#2955) --- api/team.go | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'api') diff --git a/api/team.go b/api/team.go index 605aa590b..f9b718e06 100644 --- a/api/team.go +++ b/api/team.go @@ -41,7 +41,6 @@ func InitTeam() { // These should be moved to the global admain console BaseRoutes.NeedTeam.Handle("/import_team", ApiUserRequired(importTeam)).Methods("POST") - BaseRoutes.NeedTeam.Handle("/export_team", ApiUserRequired(exportTeam)).Methods("GET") BaseRoutes.Teams.Handle("/add_user_to_team_from_invite", ApiUserRequired(addUserToTeamFromInvite)).Methods("POST") } @@ -753,25 +752,6 @@ func importTeam(c *Context, w http.ResponseWriter, r *http.Request) { http.ServeContent(w, r, "MattermostImportLog.txt", time.Now(), bytes.NewReader(log.Bytes())) } -func exportTeam(c *Context, w http.ResponseWriter, r *http.Request) { - if !c.HasPermissionsToTeam(c.TeamId, "export") || !c.IsTeamAdmin() { - c.Err = model.NewLocAppError("exportTeam", "api.team.export_team.admin.app_error", nil, "userId="+c.Session.UserId) - c.Err.StatusCode = http.StatusForbidden - return - } - - options := ExportOptionsFromJson(r.Body) - - if link, err := ExportToFile(options); err != nil { - c.Err = err - return - } else { - result := map[string]string{} - result["link"] = link - w.Write([]byte(model.MapToJson(result))) - } -} - func getInviteInfo(c *Context, w http.ResponseWriter, r *http.Request) { m := model.MapFromJson(r.Body) inviteId := m["invite_id"] -- cgit v1.2.3-1-g7c22 From d7197943f0e645c6a5a3c463ae9df2beab1256b9 Mon Sep 17 00:00:00 2001 From: Corey Hulen Date: Wed, 11 May 2016 05:24:20 -0700 Subject: Fixing compliance reporting (#2964) --- api/admin.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'api') diff --git a/api/admin.go b/api/admin.go index 7ab2c9cfc..8f66f60c1 100644 --- a/api/admin.go +++ b/api/admin.go @@ -33,7 +33,7 @@ func InitAdmin() { BaseRoutes.Admin.Handle("/analytics/{name:[A-Za-z0-9_]+}", ApiUserRequired(getAnalytics)).Methods("GET") BaseRoutes.Admin.Handle("/save_compliance_report", ApiUserRequired(saveComplianceReport)).Methods("POST") BaseRoutes.Admin.Handle("/compliance_reports", ApiUserRequired(getComplianceReports)).Methods("GET") - BaseRoutes.Admin.Handle("/download_compliance_report/{id:[A-Za-z0-9]+}", ApiUserRequired(downloadComplianceReport)).Methods("GET") + BaseRoutes.Admin.Handle("/download_compliance_report/{id:[A-Za-z0-9]+}", ApiUserRequiredTrustRequester(downloadComplianceReport)).Methods("GET") BaseRoutes.Admin.Handle("/upload_brand_image", ApiAdminSystemRequired(uploadBrandImage)).Methods("POST") BaseRoutes.Admin.Handle("/get_brand_image", ApiAppHandlerTrustRequester(getBrandImage)).Methods("GET") BaseRoutes.Admin.Handle("/reset_mfa", ApiAdminSystemRequired(adminResetMfa)).Methods("POST") -- cgit v1.2.3-1-g7c22