(network *nwo.Network, channel string, orderer *nwo.Orderer, peer *nwo.Peer)
| 1925 | } |
| 1926 | |
| 1927 | func revokeReaderAccess(network *nwo.Network, channel string, orderer *nwo.Orderer, peer *nwo.Peer) { |
| 1928 | config := nwo.GetConfig(network, peer, orderer, channel) |
| 1929 | updatedConfig := proto.Clone(config).(*common.Config) |
| 1930 | |
| 1931 | // set the policy |
| 1932 | adminPolicy := protoutil.MarshalOrPanic(&common.ImplicitMetaPolicy{ |
| 1933 | SubPolicy: "Admins", |
| 1934 | Rule: common.ImplicitMetaPolicy_MAJORITY, |
| 1935 | }) |
| 1936 | updatedConfig.ChannelGroup.Groups["Orderer"].Policies["Readers"].Policy.Value = adminPolicy |
| 1937 | nwo.UpdateOrdererConfig(network, orderer, channel, config, updatedConfig, peer, orderer) |
| 1938 | } |
| 1939 | |
| 1940 | // consenterAdder constructs configs that can be used by `UpdateOrdererConfig` |
| 1941 | // to add a consenter. |
no test coverage detected