MCPcopy
hub / github.com/sa7mon/S3Scanner / Permission

Function Permission

bucket/bucket.go:230–235  ·  view source on GitHub ↗

Permission is a convenience method to convert a boolean into either a PermissionAllowed or PermissionDenied

(canDo bool)

Source from the content-addressed store, hash-verified

228
229// Permission is a convenience method to convert a boolean into either a PermissionAllowed or PermissionDenied
230func Permission(canDo bool) uint8 {
231 if canDo {
232 return PermissionAllowed
233 }
234 return PermissionDenied
235}
236
237func IsValidS3BucketName(bucketName string) bool {
238 // TODO: Optimize the heck out of this

Callers 2

checkPermissionsWithAuthFunction · 0.92
checkPermissionsFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected