diff --git a/interfaces/builtin/registry.go b/interfaces/builtin/registry.go index 133257f3587..ba838265413 100644 --- a/interfaces/builtin/registry.go +++ b/interfaces/builtin/registry.go @@ -70,10 +70,10 @@ func (iface *registryInterface) BeforePreparePlug(plug *snap.PlugInfo) error { } // by default, snaps can read/write registries and be notified of changes. The - // manager role allows snaps to change, reject and persist changes made by others + // custodian role allows snaps to change, reject and persist changes made by others role, ok := plug.Attrs["role"].(string) - if ok && role != "manager" { - return fmt.Errorf(`optional registry plug "role" attribute must be "manager"`) + if ok && role != "custodian" { + return fmt.Errorf(`optional registry plug "role" attribute must be "custodian"`) } return nil diff --git a/interfaces/builtin/registry_test.go b/interfaces/builtin/registry_test.go index e05dbe48616..83064e070cb 100644 --- a/interfaces/builtin/registry_test.go +++ b/interfaces/builtin/registry_test.go @@ -92,7 +92,7 @@ func (s *registrySuite) TestRegistrySanitizePlug(c *C) { { account: "my-acc", view: "network/wifi", - role: "manager", + role: "custodian", }, { account: "my-acc", @@ -109,7 +109,7 @@ func (s *registrySuite) TestRegistrySanitizePlug(c *C) { account: "my-acc", view: "reg/view", role: "observer", - err: `optional registry plug "role" attribute must be "manager"`, + err: `optional registry plug "role" attribute must be "custodian"`, }, { account: "my-acc", diff --git a/overlord/hookstate/ctlcmd/get_test.go b/overlord/hookstate/ctlcmd/get_test.go index a50f585a657..60665df801a 100644 --- a/overlord/hookstate/ctlcmd/get_test.go +++ b/overlord/hookstate/ctlcmd/get_test.go @@ -557,7 +557,7 @@ plugs: interface: registry account: %[1]s view: network/write-wifi - role: manager + role: custodian `, s.devAccID) info := mockInstalledSnap(c, s.state, snapYaml, "") diff --git a/snap/info_test.go b/snap/info_test.go index e6918cbae14..b9d9db3038d 100644 --- a/snap/info_test.go +++ b/snap/info_test.go @@ -2425,7 +2425,7 @@ func (s *infoSuite) TestRegistryPlugAttrs(c *C) { Attrs: map[string]interface{}{ "account": "foo", "view": "bar/baz", - "role": "manager", + "role": "custodian", }, }