Skip to content

Commit

Permalink
bearer: Add not present condition for content-type
Browse files Browse the repository at this point in the history
Signed-off-by: Evgenii Baidakov <[email protected]>
  • Loading branch information
smallhive committed Aug 30, 2024
1 parent 7d67eb5 commit b8cdb92
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bearer/bearer.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ func (b *Generator) NewBearer(email string, currentEpoch uint64, msPerEpoch int6
eacl.AddFormedTarget(rec2, eacl.RoleOthers)
t.AddRecord(rec2)

rec3 := eacl.CreateRecord(eacl.ActionDeny, eacl.OperationPut)
rec3.AddFilter(eacl.HeaderFromObject, eacl.MatchNotPresent, object.AttributeContentType, "")
t.AddRecord(rec3)
eacl.AddFormedTarget(rec3, eacl.RoleOthers)

var bt bearer.Token
bt.SetEACLTable(*t)
if b.config.UserID != nil {
Expand Down

0 comments on commit b8cdb92

Please sign in to comment.