MCPcopy
hub / github.com/hyperledger/fabric / revokeReaderAccess

Function revokeReaderAccess

integration/raft/config_test.go:1927–1938  ·  view source on GitHub ↗
(network *nwo.Network, channel string, orderer *nwo.Orderer, peer *nwo.Peer)

Source from the content-addressed store, hash-verified

1925}
1926
1927func 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.

Callers 1

config_test.goFile · 0.85

Calls 4

GetConfigFunction · 0.92
MarshalOrPanicFunction · 0.92
UpdateOrdererConfigFunction · 0.92
CloneMethod · 0.65

Tested by

no test coverage detected