Skip to content

Commit 1e65bf7

Browse files
committed
fixup! Bug
1 parent 304e105 commit 1e65bf7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/support/mapper/ExpressionRoleMapping.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,9 @@ public boolean isEnabled() {
237237
* Whether this mapping is an operator defined/read only role mapping
238238
*/
239239
public boolean isReadOnly() {
240-
return metadata.get(ExpressionRoleMapping.READ_ONLY_ROLE_MAPPING_METADATA_FLAG) instanceof Boolean readOnly ? readOnly : false;
240+
return metadata != null && metadata.get(ExpressionRoleMapping.READ_ONLY_ROLE_MAPPING_METADATA_FLAG) instanceof Boolean readOnly
241+
? readOnly
242+
: false;
241243
}
242244

243245
@Override

0 commit comments

Comments
 (0)