Sha256: e917ec78beb541eee3ff3697f7fd40add9a8336bba6f9ee2b75ce531db04790f
Contents?: true
Size: 375 Bytes
Versions: 8
Compression:
Stored size: 375 Bytes
Contents
class S3Secure::Policy class Checker def initialize(bucket_policy) @bucket_policy = bucket_policy # existing document policy end def has?(sid) return false if @bucket_policy.blank? policy_document = JSON.load(@bucket_policy) statements = policy_document["Statement"] !!statements.detect { |s| s["Sid"] == sid } end end end
Version data entries
8 entries across 8 versions & 1 rubygems