(ctx context.Context, principal Principal, scope, collection string)
| 1444 | } |
| 1445 | |
| 1446 | func (m mockComputerV2) ComputeChannelsForPrincipal(ctx context.Context, principal Principal, scope, collection string) (ch.TimedSet, error) { |
| 1447 | if user, ok := principal.(User); ok { |
| 1448 | return m.channels[user.Name()].Copy(), nil |
| 1449 | } else { |
| 1450 | return m.roleChannels[principal.Name()].Copy(), nil |
| 1451 | } |
| 1452 | } |
| 1453 | |
| 1454 | func (m mockComputerV2) ComputeRolesForUser(ctx context.Context, user User) (ch.TimedSet, error) { |
| 1455 | return m.roles[user.Name()].Copy(), nil |