mike-jumper commented on code in PR #751:
URL: https://github.com/apache/guacamole-client/pull/751#discussion_r976926733
##########
extensions/guacamole-vault/modules/guacamole-vault-ksm/src/main/java/org/apache/guacamole/vault/ksm/secret/KsmSecretService.java:
##########
@@ -304,18 +325,101 @@ private String getConnectionGroupKsmConfig(
}
- @Override
- public Map<String, Future<String>> getTokens(UserContext userContext,
Connectable connectable,
- GuacamoleConfiguration config, TokenFilter filter) throws
GuacamoleException {
+ /**
+ * Returns true if user-level KSM configuration is enabled for the given
+ * Connectable, false otherwise.
+ *
+ * @param connectable
+ * The connectable to check for whether user-level KSM configs are
+ * enabled.
+ *
+ * @return
+ * True if user-level KSM configuration is enabled for the given
+ * Connectable, false otherwise.
+ */
+ private boolean isKsmUserConfigEnabled(Connectable connectable) {
- Map<String, Future<String>> tokens = new HashMap<>();
- Map<String, String> parameters = config.getParameters();
+ // If it's a connection, user-level config is enabled IFF the
appropriate
+ // attribute is set to true
+ if (connectable instanceof Connection)
+ return KsmAttributeService.TRUTH_VALUE.equals(((Connection)
connectable).getAttributes().get(
Review Comment:
The check and the typecast, yep.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]