Skip to content

Commit aa4d11d

Browse files
committed
cloud: allow access to maintenance resource
1 parent 933dd8c commit aa4d11d

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

service/grpc/onboardDevice.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import (
2727
"github.com/plgd-dev/device/v2/schema"
2828
"github.com/plgd-dev/device/v2/schema/acl"
2929
"github.com/plgd-dev/device/v2/schema/cloud"
30+
"github.com/plgd-dev/device/v2/schema/maintenance"
3031
"github.com/plgd-dev/device/v2/schema/softwareupdate"
3132
"github.com/plgd-dev/kit/v2/security"
3233
"google.golang.org/grpc/codes"
@@ -59,6 +60,12 @@ func setACLForCloud(ctx context.Context, p *core.ProvisioningClient, cloudID str
5960
Interfaces: []string{"*"},
6061
})
6162
}
63+
for _, href := range links.GetResourceHrefs(maintenance.ResourceType) {
64+
confResources = append(confResources, acl.Resource{
65+
Href: href,
66+
Interfaces: []string{"*"},
67+
})
68+
}
6269

6370
cloudACL := acl.UpdateRequest{
6471
AccessControlList: []acl.AccessControl{

0 commit comments

Comments
 (0)