Filter out read-only users from TC users list.

This commit is contained in:
Paulo Reis 2017-07-05 11:44:05 +01:00
parent 3de6d4037a
commit 3f25c62496
2 changed files with 1 additions and 8 deletions

View file

@ -77,7 +77,7 @@
on-toggle="toggleTrackChangesForUser(isOn, project.owner._id);" on-toggle="toggleTrackChangesForUser(isOn, project.owner._id);"
disabled="reviewPanel.trackChangesOnForEveryone || !project.features.trackChanges || !permissions.write" disabled="reviewPanel.trackChangesOnForEveryone || !project.features.trackChanges || !permissions.write"
) )
li.rp-tc-state-item(ng-repeat="member in project.members") li.rp-tc-state-item(ng-repeat="member in project.members | filter:{ privileges: 'readAndWrite' }")
span.rp-tc-state-item-name( span.rp-tc-state-item-name(
ng-class="{ 'rp-tc-state-item-name-disabled' : reviewPanel.trackChangesOnForEveryone}" ng-class="{ 'rp-tc-state-item-name-disabled' : reviewPanel.trackChangesOnForEveryone}"
style="color: hsl({{ users[member._id].hue }}, 70%, 40%);" style="color: hsl({{ users[member._id].hue }}, 70%, 40%);"

View file

@ -612,13 +612,6 @@ define [
data.on_for[userId] = userState.value data.on_for[userId] = userState.value
data._csrf = window.csrfToken data._csrf = window.csrfToken
$http.post "/project/#{$scope.project_id}/track_changes", data $http.post "/project/#{$scope.project_id}/track_changes", data
# setTrackChangesState = (state) ->
# if $scope.project.features.trackChanges
# applyClientTrackChangesStateToServer()
# event_tracking.sendMB "rp-trackchanges-toggle", { state }
# else
# $scope.openTrackChangesUpgradeModal()
applyTrackChangesStateToClient = (state) -> applyTrackChangesStateToClient = (state) ->
if typeof state is "boolean" if typeof state is "boolean"