computePerUserAcsUnion computes want and given permissions unions over all topic's subscribers.
()
| 283 | |
| 284 | // computePerUserAcsUnion computes want and given permissions unions over all topic's subscribers. |
| 285 | func (t *Topic) computePerUserAcsUnion() { |
| 286 | wantUnion := types.ModeNone |
| 287 | givenUnion := types.ModeNone |
| 288 | for _, pud := range t.perUser { |
| 289 | if pud.isChan { |
| 290 | continue |
| 291 | } |
| 292 | wantUnion |= pud.modeWant |
| 293 | givenUnion |= pud.modeGiven |
| 294 | } |
| 295 | |
| 296 | if t.isChan { |
| 297 | // Apply standard channel permissions to channel topics. |
| 298 | wantUnion |= types.ModeCChnReader |
| 299 | givenUnion |= types.ModeCChnReader |
| 300 | } |
| 301 | |
| 302 | t.modeWantUnion = wantUnion |
| 303 | t.modeGivenUnion = givenUnion |
| 304 | } |
| 305 | |
| 306 | // unregisterSession implements all logic following receipt of a leave |
| 307 | // request via the Topic.unreg channel. |
no outgoing calls
no test coverage detected