• Sean Hammond's avatar
    Keep permissions of new annotations in sync when changing group · 4ff2c56f
    Sean Hammond authored
    Keep the permissions of new annotations in sync with the group, when
    changing the focused group.
    
    This fixes an issue where a new (not yet saved to server) shared
    annotation in group Foo would become a private annotation if you changed
    the focused group to Bar.
    
    The issue is that model/@annotation.group gets changed to Foo, but
    model/@annotation.permissions still contains a permissions object with
    group Bar's ID in it, and as a result the permissions service thinks
    that it is a private annotation.
    
    The fix is to update both .group and .permissions when the focused group
    changes, and to update the drafts service _after_ doing this not before
    (otherwise a copy of the annotation containing the previous group's ID
    gets saved to the drafts service, and then later gets read from the
    drafts service and overwrites the correct data).
    
    Fixes #2713.
    4ff2c56f
Name
Last commit
Last update
..
annotation-test.coffee Loading commit data...
excerpt-test.js Loading commit data...
form-input-test.coffee Loading commit data...
form-validate-test.coffee Loading commit data...
group-list-test.js Loading commit data...
publish-annotation-btn-test.js Loading commit data...
search-status-bar-test.js Loading commit data...
share-dialog-test.coffee Loading commit data...
simple-search-test.coffee Loading commit data...
sort-dropdown-test.js Loading commit data...
spinner-test.js Loading commit data...
status-button-test.coffee Loading commit data...
thread-test.coffee Loading commit data...
util.js Loading commit data...
window-scroll-test.js Loading commit data...