You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When someone is added as a chapter editor, they should be able to edit the chapter and save.
Actual behavior
Create a book
Create a chapter
Create a second account
Add the second account to the chapter
As the second account, attempt to edit the chapter. Edits do not save.
Cause
The cause of this is that our check Firebase rules for chapter editing do not correctly check chapter editing permissions. The eligible list of chapter authors is stored on the chapter object in the list of chapters on the edition document, but the rules are checking the chapter document, which only has a text. The challenge here is that there's no easy way to write a rule that checks the corresponding chapter being edited, because we'd have to get the chapter number from its ID, by scanning the edition's chapters for the corresponding ID. It may be possible, but if not, we'll have to denormalize some data to make the rule writeable.
The text was updated successfully, but these errors were encountered:
Expected behavior
When someone is added as a chapter editor, they should be able to edit the chapter and save.
Actual behavior
Cause
The cause of this is that our check Firebase rules for chapter editing do not correctly check chapter editing permissions. The eligible list of chapter authors is stored on the chapter object in the list of chapters on the edition document, but the rules are checking the chapter document, which only has a text. The challenge here is that there's no easy way to write a rule that checks the corresponding chapter being edited, because we'd have to get the chapter number from its ID, by scanning the edition's chapters for the corresponding ID. It may be possible, but if not, we'll have to denormalize some data to make the rule writeable.
The text was updated successfully, but these errors were encountered: