private String generateSubjectAccessReview ( String namespace , String verb , String resource ) { ObjectNode objectNode = objectMapper . createObjectNode ( ) ; objectNode . put ( "apiVersion" , "v1" ) ; objectNode . put ( "kind" , KIND ) ; objectNode . put ( "resource" , resource ) ; objectNode . put ( "verb" , verb ) ; objectNode . put ( "namespace" , namespace ) ; return objectNode . toString ( ) ; }
Generates a SubjectAccessReview object used to request if a user has a certain permission or not .