Skip to content

Commit

Permalink
fix: bucket policy
Browse files Browse the repository at this point in the history
  • Loading branch information
izatop committed Mar 11, 2022
1 parent 949fc04 commit a65064f
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions packages/fs/src/Storage/Driver/MinIOBucketPolicy.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import {BucketPolicyAbstract} from "./BucketPolicyAbstract";

export enum MinIOBucketPolicyEnum {
READONLY = "public-readonly",
}

export class MinIOBucketPolicy extends BucketPolicyAbstract {
public publicReadOnlyPolicy(bucket: string): string {
public static PUBLIC_READONLY = "public-readonly";

constructor() {
super();

this.policies.set(MinIOBucketPolicy.PUBLIC_READONLY, this.getPublicReadOnlyPolicy);
}

public getPublicReadOnlyPolicy(bucket: string): string {
return JSON.stringify({
"Version": "2012-10-17",
"Statement": [
Expand Down

0 comments on commit a65064f

Please sign in to comment.