Skip to content

Commit 3556dbc

Browse files
authored
CBG-2318: Rename public channel const (#7793)
1 parent 41f1627 commit 3556dbc

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

auth/auth.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ func (auth *Authenticator) rebuildCollectionChannels(princ Principal, scope, col
274274
}
275275

276276
// always grant access to the public document channel
277-
channels.AddChannel(ch.DocumentStarChannel, 1)
277+
channels.AddChannel(ch.DocumentPublicChannel, 1)
278278

279279
channelHistory := auth.calculateHistory(princ.Name(), ca.GetChannelInvalSeq(), ca.InvalidatedChannels(), channels, ca.ChannelHistory())
280280

channels/set.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ const (
2626
)
2727

2828
// Constants for the * channel variations
29-
const UserStarChannel = "*" // user channel for "can access all docs"
30-
const DocumentStarChannel = "!" // doc channel for "visible to all users"
31-
const AllChannelWildcard = "*" // wildcard for 'all channels'
29+
const UserStarChannel = "*" // user channel for "can access all docs"
30+
const DocumentPublicChannel = "!" // doc channel for "visible to all users"
31+
const AllChannelWildcard = "*" // wildcard for 'all channels'
3232

3333
// ID represents a single channel inside a collection
3434
type ID struct {

rest/diagnostic_api.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func (h *handler) getAllUserChannelsResponse(user auth.User) (map[string]map[str
5252
}
5353
resp[keyspace] = make(map[string]channelHistory)
5454
for chanName, chanEntry := range currentChannels {
55-
if chanName == channels.DocumentStarChannel {
55+
if chanName == channels.DocumentPublicChannel {
5656
continue
5757
}
5858
resp[keyspace][chanName] = channelHistory{Entries: []auth.GrantHistorySequencePair{{StartSeq: chanEntry.Sequence, EndSeq: 0}}}

0 commit comments

Comments
 (0)