Skip to content

Commit

Permalink
GUACAMOLE-1020: Clean up unnecessary Java imports.
Browse files Browse the repository at this point in the history
  • Loading branch information
necouchman committed Sep 9, 2024
1 parent b56cc45 commit 08f9adb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

package org.apache.guacamole.auth.restrict.connection;

import com.google.inject.Inject;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
Expand All @@ -41,18 +40,12 @@
* ability to control access to the connection.
*/
public class RestrictedConnection extends DelegatingConnection implements Restrictable {

/**
* The remote address of the client from which the user logged in.
*/
private final String remoteAddress;

/**
* The restriction verification service.
*/
@Inject
private RestrictionVerificationService verificationService;

/**
* The name of the attribute that contains a list of weekdays and times (UTC)
* that this connection can be accessed. The presence of values within this
Expand Down Expand Up @@ -181,9 +174,9 @@ public void setAttributes(Map<String, String> attributes) {
@Override
public GuacamoleTunnel connect(GuacamoleClientInformation info,
Map<String, String> tokens) throws GuacamoleException {

// Verify the restrictions for this connection.
verificationService.verifyConnectionRestrictions(this, remoteAddress);
RestrictionVerificationService.verifyConnectionRestrictions(this, remoteAddress);

// Connect
return super.connect(info, tokens);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

package org.apache.guacamole.auth.restrict.connectiongroup;

import com.google.inject.Inject;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
Expand Down Expand Up @@ -47,12 +46,6 @@ public class RestrictedConnectionGroup extends DelegatingConnectionGroup impleme
*/
private final String remoteAddress;

/**
* The verification service.
*/
@Inject
private RestrictionVerificationService verificationService;

/**
* The name of the attribute that contains a list of weekdays and times (UTC)
* that this connection group can be accessed. The presence of values within
Expand Down Expand Up @@ -185,7 +178,7 @@ public GuacamoleTunnel connect(GuacamoleClientInformation info,
Map<String, String> tokens) throws GuacamoleException {

// Verify restrictions for this connection group.
verificationService.verifyConnectionRestrictions(this, remoteAddress);
RestrictionVerificationService.verifyConnectionRestrictions(this, remoteAddress);

// Connect
return super.connect(info, tokens);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
package org.apache.guacamole.auth.restrict.form;

import org.apache.guacamole.form.Field;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* A field that parses a string containing time restrictions into its individual
Expand Down

0 comments on commit 08f9adb

Please sign in to comment.