mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 05:07:41 +00:00
GUAC-800: Use Forms for attributes, not just Fields.
This commit is contained in:
@@ -38,6 +38,7 @@ import org.glyptodon.guacamole.auth.jdbc.permission.ConnectionGroupPermissionSer
|
||||
import org.glyptodon.guacamole.auth.jdbc.permission.ConnectionPermissionService;
|
||||
import org.glyptodon.guacamole.auth.jdbc.permission.UserPermissionService;
|
||||
import org.glyptodon.guacamole.form.Field;
|
||||
import org.glyptodon.guacamole.form.Form;
|
||||
import org.glyptodon.guacamole.net.auth.User;
|
||||
import org.glyptodon.guacamole.net.auth.permission.ObjectPermissionSet;
|
||||
import org.glyptodon.guacamole.net.auth.permission.SystemPermission;
|
||||
@@ -58,15 +59,19 @@ public class ModeledUser extends ModeledDirectoryObject<UserModel> implements Us
|
||||
public static final String DISABLED_ATTRIBUTE_NAME = "disabled";
|
||||
|
||||
/**
|
||||
* A typed field corresponding to the disabled attribute of a user.
|
||||
* All attributes related to restricting user accounts, within a logical
|
||||
* form.
|
||||
*/
|
||||
public static final Field DISABLED_ATTRIBUTE = new Field(DISABLED_ATTRIBUTE_NAME, "Disabled", "true");
|
||||
public static final Form ACCOUNT_RESTRICTIONS = new Form("restrictions", "Account Restrictions", Arrays.asList(
|
||||
new Field(DISABLED_ATTRIBUTE_NAME, "Disabled", "true")
|
||||
));
|
||||
|
||||
/**
|
||||
* All possible attributes of user objects.
|
||||
* All possible attributes of user objects organized as individual,
|
||||
* logical forms.
|
||||
*/
|
||||
public static final Collection<Field> ATTRIBUTES = Collections.unmodifiableCollection(Arrays.asList(
|
||||
DISABLED_ATTRIBUTE
|
||||
public static final Collection<Form> ATTRIBUTES = Collections.unmodifiableCollection(Arrays.asList(
|
||||
ACCOUNT_RESTRICTIONS
|
||||
));
|
||||
|
||||
/**
|
||||
|
@@ -33,7 +33,7 @@ import java.util.Collections;
|
||||
import org.glyptodon.guacamole.GuacamoleException;
|
||||
import org.glyptodon.guacamole.auth.jdbc.base.RestrictedObject;
|
||||
import org.glyptodon.guacamole.auth.jdbc.activeconnection.ActiveConnectionDirectory;
|
||||
import org.glyptodon.guacamole.form.Field;
|
||||
import org.glyptodon.guacamole.form.Form;
|
||||
import org.glyptodon.guacamole.net.auth.ActiveConnection;
|
||||
import org.glyptodon.guacamole.net.auth.Connection;
|
||||
import org.glyptodon.guacamole.net.auth.ConnectionGroup;
|
||||
@@ -134,18 +134,18 @@ public class UserContext extends RestrictedObject
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<Field> getUserAttributes() {
|
||||
public Collection<Form> getUserAttributes() {
|
||||
return ModeledUser.ATTRIBUTES;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<Field> getConnectionAttributes() {
|
||||
return Collections.<Field>emptyList();
|
||||
public Collection<Form> getConnectionAttributes() {
|
||||
return Collections.<Form>emptyList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<Field> getConnectionGroupAttributes() {
|
||||
return Collections.<Field>emptyList();
|
||||
public Collection<Form> getConnectionGroupAttributes() {
|
||||
return Collections.<Form>emptyList();
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -1,5 +1,9 @@
|
||||
{
|
||||
"USER_ATTRIBUTES" : {
|
||||
"FIELD_HEADER_DISABLED" : "Disabled:"
|
||||
|
||||
"FIELD_HEADER_DISABLED" : "Login disabled:",
|
||||
|
||||
"SECTION_HEADER_RESTRICTIONS" : "Account Restrictions"
|
||||
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user