*/
@Override
public boolean isEnabled(ToadletContext toadletContext) {
- return getCurrentSone(toadletContext, false) != null;
+ return (getCurrentSone(toadletContext, false) != null) && (webInterface.getCore().getLocalSones().size() != 1);
}
}
* currently logged in
*/
public Sone getCurrentSone(ToadletContext toadletContext, boolean create) {
+ Set<Sone> localSones = getCore().getLocalSones();
+ if (localSones.size() == 1) {
+ return localSones.iterator().next();
+ }
return getCurrentSone(getCurrentSession(toadletContext, create));
}