File tree Expand file tree Collapse file tree
lib/entitlements/data/groups/calculated
entitlements/data/groups/calculated
fixtures/ldap-config/metadata Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -294,7 +294,7 @@ def parsed_data
294294 result [ key ] [ "&=" ] ||= [ ]
295295
296296 # Semicolon predicates
297- if key == "description"
297+ if key == "description" || key . start_with? ( "metadata_" )
298298 result [ key ] [ operator ] << { key : val }
299299 else
300300 result [ key ] [ operator ] << parsed_predicate ( val )
Original file line number Diff line number Diff line change 183183 expect ( subject . metadata ) . to eq ( "kittens" => "awesome" , "puppies" => "young dogs" )
184184 end
185185
186- it "raises an error if expiration is given to metadata" do
187- filename = fixture ( "ldap-config/metadata/expiration.txt" )
188- message = "In #{ filename } , the key metadata_kittens cannot have additional setting(s) \" expiration\" !"
189- expect { described_class . new ( filename : filename ) } . to raise_error ( message )
186+ it "does not raise an error when metadata values contain semicolons" do
187+ filename = fixture ( "ldap-config/metadata/semicolon.txt" )
188+ expect { described_class . new ( filename : filename ) } . not_to raise_error
189+ subject = described_class . new ( filename : filename )
190+ expect ( subject . metadata ) . to eq ( "kittens" => "awesome" , "justification" => "Need access; for project work" )
190191 end
191192 end
192193
Original file line number Diff line number Diff line change 1+ description = Lots of metadata here
2+ username = BlackManx
3+ username = RAGAMUFFIn
4+ metadata_kittens = awesome
5+ metadata_justification = Need access; for project work
You can’t perform that action at this time.
0 commit comments