mirror of
https://gitee.com/jmix/cuba.git
synced 2024-12-03 19:57:36 +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.CreateAction;
|
||||||
import com.haulmont.cuba.gui.components.actions.EditAction;
|
import com.haulmont.cuba.gui.components.actions.EditAction;
|
||||||
import com.haulmont.cuba.gui.components.actions.ItemTrackingAction;
|
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.Datasource;
|
||||||
import com.haulmont.cuba.gui.data.HierarchicalDatasource;
|
import com.haulmont.cuba.gui.data.HierarchicalDatasource;
|
||||||
import com.haulmont.cuba.gui.data.impl.DsListenerAdapter;
|
import com.haulmont.cuba.gui.data.impl.DsListenerAdapter;
|
||||||
@ -35,9 +34,6 @@ import java.util.*;
|
|||||||
*/
|
*/
|
||||||
public class GroupBrowser extends AbstractWindow {
|
public class GroupBrowser extends AbstractWindow {
|
||||||
|
|
||||||
@Inject
|
|
||||||
protected DataSupplier dataSupplier;
|
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
protected UserManagementService userManagementService;
|
protected UserManagementService userManagementService;
|
||||||
|
|
||||||
@ -128,9 +124,9 @@ public class GroupBrowser extends AbstractWindow {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setEnabled(boolean enabled) {
|
public boolean isApplicableTo(Datasource.State state, Entity item) {
|
||||||
super.setEnabled(enabled && userSession.isEntityOpPermitted(metadata.getSession().getClass(User.class),
|
return super.isApplicableTo(state, item) && userSession.isEntityOpPermitted(metadata.getSession().getClass(User.class),
|
||||||
EntityOp.UPDATE));
|
EntityOp.UPDATE);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -247,4 +243,4 @@ public class GroupBrowser extends AbstractWindow {
|
|||||||
super.actionPerform(component);
|
super.actionPerform(component);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user