diff --git a/services/web/app/coffee/Features/Project/ProjectEditorHandler.coffee b/services/web/app/coffee/Features/Project/ProjectEditorHandler.coffee index 37878fae09..3af40bf162 100644 --- a/services/web/app/coffee/Features/Project/ProjectEditorHandler.coffee +++ b/services/web/app/coffee/Features/Project/ProjectEditorHandler.coffee @@ -22,7 +22,7 @@ module.exports = ProjectEditorHandler = trackChangesVisible = false for member in members - if member.privilegeLevel == "owner" and member.user?.featureSwitches?.track_changes + if member.privilegeLevel == "owner" and (member.user?.featureSwitches?.track_changes or member.user?.betaProgram) trackChangesVisible = true {owner, ownerFeatures, members} = @buildOwnerAndMembersViews(members) @@ -37,8 +37,8 @@ module.exports = ProjectEditorHandler = compileGroup:"standard" templates: false references: false - trackChanges: true # TODO: Set this to false to make track changes a paid feature - trackChangesVisible: trackChangesVisible # TODO: Get this from the beta flag when going to public beta + trackChanges: false + trackChangesVisible: trackChangesVisible }) return result diff --git a/services/web/public/coffee/ide/editor/EditorManager.coffee b/services/web/public/coffee/ide/editor/EditorManager.coffee index 3b6672fae8..e01a12cb8b 100644 --- a/services/web/public/coffee/ide/editor/EditorManager.coffee +++ b/services/web/public/coffee/ide/editor/EditorManager.coffee @@ -11,7 +11,7 @@ define [ open_doc_name: null opening: true trackChanges: false - wantTrackChanges: window.trackChangesEnabled + wantTrackChanges: false } @$scope.$on "entity:selected", (event, entity) => @@ -37,6 +37,10 @@ define [ @$scope.$watch "editor.wantTrackChanges", (value) => return if !value? @_syncTrackChangesState(@$scope.editor.sharejs_doc) + + @$scope.$watch "project.features.trackChanges", (trackChangesFeature) => + return if !trackChangesFeature? + @$scope.editor.wantTrackChanges = window.trackChangesEnabled and trackChangesFeature autoOpenDoc: () -> open_doc_id =