Skip to content

Commit ba8e223

Browse files
committed
Removing use doingDefaults, but keeping byCombo
1 parent 21e8638 commit ba8e223

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/acl-control.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +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-
var defaultOrMain = options.doingDefaults ? 'default' : 'main'
98-
options = options || {}
96+
function ACLControlEditable (box, doc, aclDoc, kb, options = {}) {
9997
var ac = UI.acl.readACL(doc, aclDoc, kb, options.doingDefaults) // Note kb might not be normal one
100-
var byCombo
101-
box[defaultOrMain] = byCombo = UI.acl.ACLbyCombination(ac)
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+
102100
var kToCombo = function (k) {
103101
var y = ['Read', 'Append', 'Write', 'Control']
104102
var combo = []
@@ -111,6 +109,7 @@ UI.aclControl.ACLControlBox5 = function (subject, dom, noun, kb, callback) {
111109
combo = combo.join('\n')
112110
return combo
113111
}
112+
114113
var colloquial = {13: 'Owners', 9: 'Owners (write locked)', 5: 'Editors', 3: 'Posters', 2: 'Submitters', 1: 'Viewers'}
115114
var recommended = {13: true, 5: true, 3: true, 2: true, 1: true}
116115
var explanation = {

0 commit comments

Comments
 (0)