Release ObjectStore 0.0.9

This commit is contained in:
admin committed 2026-10-25 07:02:09 +01:00
1 parent 31eb4d092e
commit 0cf5c11202
39 files changed
+4739 -1167

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
package cloud.lunarsky.store;
import java.io.IOException;
final class S3Access {
private final ObjectStorage store;
private final String owner;
S3Access(ObjectStorage store, String owner) {
this.store = store;
this.owner = owner;
}
String owner() {
return owner;
}
void requireOwner(String principal) {
if (!owner.equals(principal)) throw new StoreException(403, "AccessDenied", "Access denied");
}
void requireBucket(String bucket, String principal, int permission) throws IOException {
Acl.require(store.bucket(bucket).acl(), principal, owner, permission);
}
}