GuacamoleConfigurationPermission should take identifier as subject, not actual GuacamoleConfiguration.

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

View File

@@ -37,23 +37,23 @@ package net.sourceforge.guacamole.net.auth.permission;
* *
* ***** END LICENSE BLOCK ***** */ * ***** END LICENSE BLOCK ***** */
import net.sourceforge.guacamole.protocol.GuacamoleConfiguration;
/** /**
* A permission which controls operations that directly affect a specific * A permission which controls operations that directly affect a specific
* GuacamoleConfiguration. * GuacamoleConfiguration. Note that this permission only refers to the
* GuacamoleConfiguration by its identifier. The actual GuacamoleConfiguration
* is not stored within.
* *
* @author Michael Jumper * @author Michael Jumper
*/ */
public class GuacamoleConfigurationPermission public class GuacamoleConfigurationPermission
implements ObjectPermission<GuacamoleConfiguration> { implements ObjectPermission<String> {
/** /**
* The GuacamoleConfiguration associated with the operation affected by * The identifier of the GuacamoleConfiguration associated with the
* this permission. * operation affected by this permission.
*/ */
private GuacamoleConfiguration subject; private String subject;
/** /**
* The type of operation affected by this permission. * The type of operation affected by this permission.
@@ -65,11 +65,10 @@ public class GuacamoleConfigurationPermission
* and subject. * 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 GuacamoleConfiguration associated with the operation * @param subject The identifier of the GuacamoleConfiguration associated
* affected by this permission. * with the operation affected by this permission.
*/ */
public GuacamoleConfigurationPermission(Type type, public GuacamoleConfigurationPermission(Type type, String subject) {
GuacamoleConfiguration subject) {
this.subject = subject; this.subject = subject;
this.type = type; this.type = type;
@@ -77,7 +76,7 @@ public class GuacamoleConfigurationPermission
} }
@Override @Override
public GuacamoleConfiguration getSubject() { public String getSubject() {
return subject; return subject;
} }