mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 05:07:41 +00:00
GUACAMOLE-1224: Log extension sources of objects affected by REST API.
This commit is contained in:
@@ -55,6 +55,7 @@ public class AffectedObject implements LoggableDetail {
|
||||
|
||||
Object object = event.getObject();
|
||||
String identifier = event.getObjectIdentifier();
|
||||
String dataSource = event.getAuthenticationProvider().getIdentifier();
|
||||
|
||||
String objectType;
|
||||
String name = null; // Not all objects have names
|
||||
@@ -95,8 +96,8 @@ public class AffectedObject implements LoggableDetail {
|
||||
// Users
|
||||
case USER:
|
||||
|
||||
if (identifier.equals(event.getAuthenticatedUser().getIdentifier()))
|
||||
return "their own user account";
|
||||
if (identifier != null && identifier.equals(event.getAuthenticatedUser().getIdentifier()))
|
||||
return "their own user account within \"" + dataSource + "\"";
|
||||
|
||||
objectType = "user";
|
||||
break;
|
||||
@@ -116,12 +117,12 @@ public class AffectedObject implements LoggableDetail {
|
||||
// including the name of the object, as well, if available
|
||||
if (identifier != null) {
|
||||
if (name != null)
|
||||
return objectType + " \"" + identifier + "\" (currently named \"" + name + "\")";
|
||||
return objectType + " \"" + identifier + "\" within \"" + dataSource + "\" (currently named \"" + name + "\")";
|
||||
else
|
||||
return objectType + " \"" + identifier + "\"";
|
||||
return objectType + " \"" + identifier + "\" within \"" + dataSource + "\"";
|
||||
}
|
||||
else
|
||||
return objectType;
|
||||
return objectType + " within \"" + dataSource + "\"";
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user