Skip to content

Commit b8b2061

Browse files
authored
Merge pull request #153 from solid/revert-byCombo
Reintroducing use of byCombo
2 parents 58a5a66 + ba8e223 commit b8b2061

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/acl-control.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,10 @@ UI.aclControl.ACLControlBox5 = function (subject, dom, noun, kb, callback) {
9393
// This is the main function which produces an editable access control.
9494
// There are two of these in all iff the defaults are separate
9595
//
96-
function ACLControlEditable (box, doc, aclDoc, kb, options) {
97-
options = options || {}
98-
var byCombo
96+
function ACLControlEditable (box, doc, aclDoc, kb, options = {}) {
97+
var ac = UI.acl.readACL(doc, aclDoc, kb, options.doingDefaults) // Note kb might not be normal one
98+
var byCombo = UI.acl.ACLbyCombination(ac) // important to keep this, as removal will trigger bugs like https://github.com/solid/solid-panes/issues/193#issuecomment-549777549
99+
99100
var kToCombo = function (k) {
100101
var y = ['Read', 'Append', 'Write', 'Control']
101102
var combo = []
@@ -108,6 +109,7 @@ UI.aclControl.ACLControlBox5 = function (subject, dom, noun, kb, callback) {
108109
combo = combo.join('\n')
109110
return combo
110111
}
112+
111113
var colloquial = {13: 'Owners', 9: 'Owners (write locked)', 5: 'Editors', 3: 'Posters', 2: 'Submitters', 1: 'Viewers'}
112114
var recommended = {13: true, 5: true, 3: true, 2: true, 1: true}
113115
var explanation = {

0 commit comments

Comments
 (0)