mirror of
https://gitee.com/jmix/cuba.git
synced 2024-12-03 19:57:36 +08:00
Substitution mechanism support for screen history #PL-4870
This commit is contained in:
parent
9c84e5480a
commit
aeff6341e1
@ -5,16 +5,8 @@
|
||||
|
||||
package com.haulmont.cuba.web.app.ui.security.history;
|
||||
|
||||
import com.haulmont.cuba.gui.AppConfig;
|
||||
import com.haulmont.cuba.gui.components.AbstractFrame;
|
||||
import com.haulmont.cuba.gui.components.Component;
|
||||
import com.haulmont.cuba.gui.components.Label;
|
||||
import com.haulmont.cuba.gui.components.Table;
|
||||
import com.haulmont.cuba.gui.xml.layout.ComponentsFactory;
|
||||
import com.haulmont.cuba.security.entity.ScreenHistoryEntity;
|
||||
import com.haulmont.cuba.security.entity.User;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
@ -23,9 +15,6 @@ import java.util.Map;
|
||||
*/
|
||||
public class EntityOpenHistoryFrame extends AbstractFrame {
|
||||
|
||||
@Inject
|
||||
protected Table historyTable;
|
||||
|
||||
@Override
|
||||
public void init(Map<String, Object> params) {
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ public class ScreenHistoryDatasource extends CollectionDatasourceImpl<ScreenHist
|
||||
protected void loadData(Map<String, Object> params) {
|
||||
UserSession userSession = AppBeans.get(UserSessionSource.class).getUserSession();
|
||||
User user = null;
|
||||
if(userSession.getSubstitutedUser() != null) {
|
||||
if (userSession.getSubstitutedUser() != null) {
|
||||
user = userSession.getSubstitutedUser();
|
||||
} else {
|
||||
user = userSession.getUser();
|
||||
|
@ -5,16 +5,8 @@
|
||||
|
||||
package com.haulmont.cuba.web.app.ui.security.history;
|
||||
|
||||
import com.haulmont.cuba.gui.AppConfig;
|
||||
import com.haulmont.cuba.gui.components.AbstractFrame;
|
||||
import com.haulmont.cuba.gui.components.Component;
|
||||
import com.haulmont.cuba.gui.components.Label;
|
||||
import com.haulmont.cuba.gui.components.Table;
|
||||
import com.haulmont.cuba.gui.xml.layout.ComponentsFactory;
|
||||
import com.haulmont.cuba.security.entity.ScreenHistoryEntity;
|
||||
import com.haulmont.cuba.security.entity.User;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
@ -24,9 +16,6 @@ import java.util.Map;
|
||||
*/
|
||||
public class EntityOpenHistoryFrame extends AbstractFrame {
|
||||
|
||||
@Inject
|
||||
protected Table historyTable;
|
||||
|
||||
@Override
|
||||
public void init(Map<String, Object> params) {
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ public class ScreenHistoryDatasource extends CollectionDatasourceImpl<ScreenHist
|
||||
protected void loadData(Map<String, Object> params) {
|
||||
UserSession userSession = AppBeans.get(UserSessionSource.class).getUserSession();
|
||||
User user = null;
|
||||
if(userSession.getSubstitutedUser() != null) {
|
||||
if (userSession.getSubstitutedUser() != null) {
|
||||
user = userSession.getSubstitutedUser();
|
||||
} else {
|
||||
user = userSession.getUser();
|
||||
|
Loading…
Reference in New Issue
Block a user