@Override
    protected ConnectionRecord decorate(ConnectionRecord record) throws GuacamoleException {

        // Provide access to logs only if permission is granted
        if (canViewLogs(record))
            return new HistoryConnectionRecord(record);

        return record;

    }
Returns whether the current user has permission to view the logs
associated with the given history record. It is already given that the
user has permission to view the history record itself. This extension
considers a user to have permission to view history logs if they are
an administrator or if they have permission to edit the associated
connection.

@param record
    The record to check.

@return
    true if the current user has permission to view the logs associated
    with the given record, false otherwise.
extensions/guacamole-history-recording-storage/src/main/java/org/apache/guacamole/history/connection/RecordedConnectionActivityRecordSet.java