diff options
| author | Chris Lu <chrislusf@users.noreply.github.com> | 2020-11-12 13:25:28 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-12 13:25:28 -0800 |
| commit | ed3b0f81c6ce628522dbaa5edf0c4fc71175098d (patch) | |
| tree | b652c1a270c62090c9fa652fbfc9d7835863320f /weed/s3api/filer_util.go | |
| parent | a4dfa00030b7c7e0aeeaee7c00da203dc9cd0ed0 (diff) | |
| parent | c4f0fd6e1b2b66a988831bbcec15033aedb79420 (diff) | |
| download | seaweedfs-ed3b0f81c6ce628522dbaa5edf0c4fc71175098d.tar.xz seaweedfs-ed3b0f81c6ce628522dbaa5edf0c4fc71175098d.zip | |
Merge pull request #1613 from taozix/master
check permission for bucket delete/head.
Diffstat (limited to 'weed/s3api/filer_util.go')
| -rw-r--r-- | weed/s3api/filer_util.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/weed/s3api/filer_util.go b/weed/s3api/filer_util.go index ebdbe8245..72df337a5 100644 --- a/weed/s3api/filer_util.go +++ b/weed/s3api/filer_util.go @@ -7,6 +7,7 @@ import ( "github.com/chrislusf/seaweedfs/weed/glog" "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" + "github.com/chrislusf/seaweedfs/weed/util" ) func (s3a *S3ApiServer) mkdir(parentDirectoryPath string, dirName string, fn func(entry *filer_pb.Entry)) error { @@ -75,6 +76,11 @@ func (s3a *S3ApiServer) exists(parentDirectoryPath string, entryName string, isD } +func (s3a *S3ApiServer) get(parentDirectoryPath, entryName string) (entry *filer_pb.Entry, err error) { + fullPath := util.NewFullPath(parentDirectoryPath, entryName) + return filer_pb.GetEntry(s3a, fullPath) +} + func objectKey(key *string) *string { if strings.HasPrefix(*key, "/") { t := (*key)[1:] |
