Remove unused link sharing rollout, but keep onboarding popup

This commit is contained in:
Alasdair Smith 2017-11-22 17:07:50 +00:00
parent 6f8b0c6e87
commit e61b82c452
6 changed files with 3 additions and 64 deletions

View file

@ -300,13 +300,6 @@ module.exports = ProjectController =
token = TokenAccessHandler.getRequestToken(req, project_id)
isTokenMember = results.isTokenMember
# Roll out token-access based on Project owner
enableTokenAccessUI = ProjectController._isInPercentageRollout(
'linksharing',
project.owner_ref,
100
)
showLinkSharingOnboarding = enableTokenAccessUI && results.couldShowLinkSharingOnboarding
AuthorizationManager.getPrivilegeLevelForProject user_id, project_id, token, (error, privilegeLevel)->
return next(error) if error?
if !privilegeLevel? or privilegeLevel == PrivilegeLevels.NONE
@ -355,8 +348,7 @@ module.exports = ProjectController =
languages: Settings.languages
themes: THEME_LIST
maxDocLength: Settings.max_doc_length
enableTokenAccessUI: enableTokenAccessUI
showLinkSharingOnboarding: showLinkSharingOnboarding
showLinkSharingOnboarding: !!results.couldShowLinkSharingOnboarding
timer.done()
_buildProjectList: (allProjects, v1Projects = [])->

View file

@ -124,7 +124,6 @@ block requirejs
window.showAutoCompileOnboarding = #{!!showAutoCompileOnboarding}
window.showLinkSharingOnboarding = #{!!showLinkSharingOnboarding}
window.wikiEnabled = #{!!(settings.apis.wiki && settings.apis.wiki.url)};
window.enableTokenAccessUI = #{enableTokenAccessUI}
window.requirejs = {
"paths" : {
"mathjax": "#{buildJsPath('/libs/mathjax/MathJax.js', {cdn:false, fingerprint:false, qs:{config:'TeX-AMS_HTML'}})}",

View file

@ -91,9 +91,7 @@
)
li.rp-tc-state-separator
li.rp-tc-state-item.rp-tc-state-item-guests(
ng-if="__enableTokenAccessUI"
)
li.rp-tc-state-item.rp-tc-state-item-guests
span.rp-tc-state-item-name(
ng-class="{ 'rp-tc-state-item-name-disabled' : reviewPanel.trackChangesOnForEveryone}"
tooltip=translate('tc_switch_guests_tip')

View file

@ -9,18 +9,8 @@ script(type='text/ng-template', id='shareProjectModalTemplate')
.modal-body.modal-body-share
.container-fluid
//- Private
.row.public-access-level(ng-show="project.publicAccesLevel == 'private' && __enableTokenAccessUI == false")
.col-xs-12.text-center
| #{translate("this_project_is_private")}
|   
a(
href
ng-click="openMakePublicModal()"
) #{translate("make_public")}
//- Private (with token-access available)
.row.public-access-level(ng-show="project.publicAccesLevel == 'private' && __enableTokenAccessUI == true")
.row.public-access-level(ng-show="project.publicAccesLevel == 'private'")
.col-xs-12.text-center
| #{translate('link_sharing_is_off')}.
|   
@ -206,31 +196,6 @@ script(type='text/ng-template', id='shareProjectModalTemplate')
ng-click="done()"
) #{translate("close")}
script(type="text/ng-template", id="makePublicModalTemplate")
.modal-header
button.close(
type="button"
data-dismiss="modal"
ng-click="cancel()"
) ×
h3 #{translate("make_project_public")}?
.modal-body.modal-body-share
p #{translate("make_project_public_consequences")}
p
select.form-control(
ng-model="inputs.privileges"
name="privileges"
)
option(value="readAndWrite") #{translate("allow_public_editing")}
option(value="readOnly") #{translate("allow_public_read_only")}
.modal-footer
button.btn.btn-default(
ng-click="cancel()"
) #{translate("cancel")}
button.btn.btn-info(
ng-click="makePublic()"
) #{translate("make_public")}
script(type="text/ng-template", id="makeTokenBasedModalTemplate")
.modal-header
button.close(

View file

@ -82,14 +82,6 @@ define [
linkSharing: if window.showLinkSharingOnboarding then 'unseen' else 'dismissed'
}
$scope.user = window.user
$scope.__enableTokenAccessUI = window.enableTokenAccessUI == true
# TODO: remove after rollout and testing
window.turnOnTokenAccessUI = () ->
$scope.__enableTokenAccessUI = true
$scope.$digest
window.turnOffTokenAccessUI = () ->
$scope.__enableTokenAccessUI = false
$scope.$digest
$scope.shouldABTestPlans = false
if $scope.user.signUpDate >= '2016-10-27'

View file

@ -178,13 +178,6 @@ define [
$scope.state.error = "Sorry, something went wrong resending the invite :("
event.target.blur()
$scope.openMakePublicModal = () ->
$modal.open {
templateUrl: "makePublicModalTemplate"
controller: "MakePublicModalController"
scope: $scope
}
$scope.openMakePrivateModal = () ->
$modal.open {
templateUrl: "makePrivateModalTemplate"