mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-11-05 11:37:44 +01:00
s3tables: fix inconsistent permission check in handleCreateTableBucket
This commit is contained in:
1 parent
a689c1e052
commit
612eae9ae8
1 file changed
+2
-1
@@ -14,8 +14,9 @@ import (
|
||||
// handleCreateTableBucket creates a new table bucket
|
||||
func (h *S3TablesHandler) handleCreateTableBucket(w http.ResponseWriter, r *http.Request, filerClient FilerClient) error {
|
||||
// Check permission
|
||||
accountID := h.getAccountID(r)
|
||||
principal := h.getPrincipalFromRequest(r)
|
||||
if !CanCreateTableBucket(principal, h.accountID) {
|
||||
if !CanCreateTableBucket(principal, accountID) {
|
||||
h.writeError(w, http.StatusForbidden, ErrCodeAccessDenied, "not authorized to create table buckets")
|
||||
return NewAuthError("CreateTableBucket", principal, "not authorized to create table buckets")
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user