satellite/console/consolewasm: no direct cast to grant.Permission
A new field is introduced to grant.Permission in storj.io/common. Having a direct cast here leads to compilation problems when bumping storj.io/uplink to the latest storj.io/common. Avoiding the direct cast resolves the issue. Context: https://github.com/storj/storj/issues/6249 Change-Id: I3b9bc14ebcce8e192e218c621b996300753b8de4
This commit is contained in:
parent
6195b8cd52
commit
82b108de69
@ -26,7 +26,17 @@ func RestrictGrant(accessGrant string, paths []string, permission Permission) (s
|
||||
prefixes = append(prefixes, prefix)
|
||||
}
|
||||
|
||||
restricted, err := access.Restrict(grant.Permission(permission), prefixes...)
|
||||
restricted, err := access.Restrict(
|
||||
grant.Permission{
|
||||
AllowDownload: permission.AllowDownload,
|
||||
AllowUpload: permission.AllowUpload,
|
||||
AllowList: permission.AllowList,
|
||||
AllowDelete: permission.AllowDelete,
|
||||
NotBefore: permission.NotBefore,
|
||||
NotAfter: permission.NotAfter,
|
||||
},
|
||||
prefixes...,
|
||||
)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user