UserPermission should use username.

This commit is contained in:
Michael Jumper
2013-01-28 16:45:30 -08:00
committed by Michael Jumper
parent 2df5207518
commit dfca47d415

View File

@@ -46,12 +46,13 @@ import net.sourceforge.guacamole.net.auth.User;
* *
* @author Michael Jumper * @author Michael Jumper
*/ */
public class UserPermission implements ObjectPermission<User> { public class UserPermission implements ObjectPermission<String> {
/** /**
* The User associated with the operation affected by this permission. * The username of the User associated with the operation affected by this
* permission.
*/ */
private User subject; private String subject;
/** /**
* The type of operation affected by this permission. * The type of operation affected by this permission.
@@ -62,10 +63,10 @@ public class UserPermission implements ObjectPermission<User> {
* Creates a new UserPermission having the given type and subject. * Creates a new UserPermission having the given type and subject.
* *
* @param type The type of operation affected by this permission. * @param type The type of operation affected by this permission.
* @param subject The User associated with the operation affected by this * @param subject The username of the User associated with the operation
* permission. * affected by this permission.
*/ */
public UserPermission(User subject, Type type) { public UserPermission(String subject, Type type) {
this.subject = subject; this.subject = subject;
this.type = type; this.type = type;
@@ -73,7 +74,7 @@ public class UserPermission implements ObjectPermission<User> {
} }
@Override @Override
public User getSubject() { public String getSubject() {
return subject; return subject;
} }