Commit 90be6516 authored by Aron Carroll's avatar Aron Carroll

Merge pull request #1807 from hypothesis/1799-default-public-visibility

Default to public visibility on annotations.
parents 3972fe21 6a44f65b
...@@ -64,7 +64,7 @@ privacy = ['$window', ($window) -> ...@@ -64,7 +64,7 @@ privacy = ['$window', ($window) ->
controller.$render = -> controller.$render = ->
unless controller.$modelValue.read.length unless controller.$modelValue.read.length
name = storage.getItem VISIBILITY_KEY name = storage.getItem VISIBILITY_KEY
name ?= VISIBILITY_PRIVATE name ?= VISIBILITY_PUBLIC
level = getLevel(name) level = getLevel(name)
controller.$setViewValue level controller.$setViewValue level
......
...@@ -89,12 +89,12 @@ describe 'h.directives.privacy', -> ...@@ -89,12 +89,12 @@ describe 'h.directives.privacy', ->
beforeEach -> beforeEach ->
store.removeItem VISIBILITY_KEY store.removeItem VISIBILITY_KEY
it 'defaults to private', -> it 'defaults to public', ->
$scope.permissions = {read: []} $scope.permissions = {read: []}
$element = $compile('<privacy ng-model="permissions">')($scope) $element = $compile('<privacy ng-model="permissions">')($scope)
$scope.$digest() $scope.$digest()
$isolateScope = $element.isolateScope() $isolateScope = $element.isolateScope()
assert.equal $isolateScope.level.name, VISIBILITY_PRIVATE assert.equal $isolateScope.level.name, VISIBILITY_PUBLIC
describe 'when permissions.read is empty', -> describe 'when permissions.read is empty', ->
beforeEach -> beforeEach ->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment