chiark
/
gitweb
/
~ianmdlvl
/
otter.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a8933a2
)
AssetUrlKey: make token
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Tue, 4 May 2021 01:02:04 +0000
(
02:02
+0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Tue, 4 May 2021 11:27:11 +0000
(12:27 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/bundles.rs
patch
|
blob
|
history
diff --git
a/src/bundles.rs
b/src/bundles.rs
index 844eb17f11103691f65639016c1c2e25a4423208..8a9c7eebf7560875628706ae6a33624719dc5888 100644
(file)
--- a/
src/bundles.rs
+++ b/
src/bundles.rs
@@
-221,6
+221,10
@@
impl Id {
let auth = Authorisation::authorised(name).bundles();
self.open_by_name(name, auth)?
}
+
+ pub fn token(&self, instance: &Instance) -> AssetUrlToken {
+ instance.asset_url_key.token("bundle", &(&*instance.name, *self))
+ }
}
#[derive(Debug,Copy,Clone,Error)]