mirror of
https://gitee.com/jmix/cuba.git
synced 2024-12-03 03:38:33 +08:00
GroupBrowser: moveToGroup button always disabled #PL-2032
This commit is contained in:
parent
63bcbd6f45
commit
ec74d506d7
@ -13,7 +13,6 @@ import com.haulmont.cuba.gui.components.*;
|
||||
import com.haulmont.cuba.gui.components.actions.CreateAction;
|
||||
import com.haulmont.cuba.gui.components.actions.EditAction;
|
||||
import com.haulmont.cuba.gui.components.actions.ItemTrackingAction;
|
||||
import com.haulmont.cuba.gui.data.DataSupplier;
|
||||
import com.haulmont.cuba.gui.data.Datasource;
|
||||
import com.haulmont.cuba.gui.data.HierarchicalDatasource;
|
||||
import com.haulmont.cuba.gui.data.impl.DsListenerAdapter;
|
||||
@ -35,9 +34,6 @@ import java.util.*;
|
||||
*/
|
||||
public class GroupBrowser extends AbstractWindow {
|
||||
|
||||
@Inject
|
||||
protected DataSupplier dataSupplier;
|
||||
|
||||
@Inject
|
||||
protected UserManagementService userManagementService;
|
||||
|
||||
@ -128,9 +124,9 @@ public class GroupBrowser extends AbstractWindow {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setEnabled(boolean enabled) {
|
||||
super.setEnabled(enabled && userSession.isEntityOpPermitted(metadata.getSession().getClass(User.class),
|
||||
EntityOp.UPDATE));
|
||||
public boolean isApplicableTo(Datasource.State state, Entity item) {
|
||||
return super.isApplicableTo(state, item) && userSession.isEntityOpPermitted(metadata.getSession().getClass(User.class),
|
||||
EntityOp.UPDATE);
|
||||
}
|
||||
});
|
||||
|
||||
@ -247,4 +243,4 @@ public class GroupBrowser extends AbstractWindow {
|
||||
super.actionPerform(component);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user