Commit f15bc2db authored by michael.simon's avatar michael.simon
Browse files

show groups in infotainment

parent 1c8471c1
package edu.kit.scc.nextcloud;
import java.util.ArrayList;
import javax.xml.bind.annotation.XmlElement;
public class NextcloudGroups {
private ArrayList<String> groupList;
@XmlElement(name = "element")
public ArrayList<String> getGroupList() {
return groupList;
}
public void setGroupList(ArrayList<String> groupList) {
this.groupList = groupList;
}
}
package edu.kit.scc.nextcloud;
import javax.xml.bind.annotation.XmlElement;
public class NextcloudUser {
private Boolean enabled;
......@@ -7,6 +9,7 @@ public class NextcloudUser {
private String email;
private String displayName;
private NextcloudQuota quota;
private NextcloudGroups groups;
public Boolean getEnabled() {
return enabled;
......@@ -32,6 +35,7 @@ public class NextcloudUser {
this.email = email;
}
@XmlElement(name = "displayname")
public String getDisplayName() {
return displayName;
}
......@@ -47,6 +51,14 @@ public class NextcloudUser {
public void setQuota(NextcloudQuota quota) {
this.quota = quota;
}
public NextcloudGroups getGroups() {
return groups;
}
public void setGroups(NextcloudGroups groups) {
this.groups = groups;
}
}
......@@ -69,6 +69,11 @@ public class NextcloudRegisterWorkflow implements RegisterUserWorkflow, Infotai
if (answer.getUser().getQuota() != null) {
new InfotainmentTreeNode("Verbrauchter Platz", "" + answer.getUser().getQuota().getRelative() + "%", node);
}
if (answer.getUser().getGroups() != null) {
for (String group : answer.getUser().getGroups().getGroupList()) {
new InfotainmentTreeNode("Gruppe", group, node);
}
}
}
return info;
......@@ -189,7 +194,7 @@ public class NextcloudRegisterWorkflow implements RegisterUserWorkflow, Infotai
if (entry.getKey().equals("id")) {
// this should not happen. It means the primary Id for the user has changed.
// Nextcloud saml does not support this
logger.warn("Nextcloud User ID for user {} would change from {} to {}!",
logger.warn("Nextcloud User ID for user {} changes from {} to {}! This will create a new user!",
registry.getRegistryValues().get("id"), entry.getValue());
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment