IDEMPIERE-297 Any user can create new reports (PF) - thanks to Nelson Chan for reporting and Hesham S. Ahmed for the suggested patch
This commit is contained in:
parent
124c49217b
commit
11583224a9
|
@ -130,7 +130,7 @@ public class Viewer extends CFrame
|
|||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 7306392362119021781L;
|
||||
private static final long serialVersionUID = 3453340777183200393L;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
|
@ -451,9 +451,14 @@ public class Viewer extends CFrame
|
|||
{
|
||||
log.log(Level.SEVERE, sql, e);
|
||||
}
|
||||
StringBuffer sb = new StringBuffer("** ").append(Msg.getMsg(m_ctx, "NewReport")).append(" **");
|
||||
KeyNamePair pp = new KeyNamePair(-1, sb.toString());
|
||||
comboReport.addItem(pp);
|
||||
// IDEMPIERE-297 - Check for Table Access and Window Access for New Report
|
||||
if ( MRole.getDefault().isTableAccess(MPrintFormat.Table_ID, false)
|
||||
&& MRole.getDefault().getWindowAccess(WINDOW_PRINTFORMAT))
|
||||
{
|
||||
StringBuffer sb = new StringBuffer("** ").append(Msg.getMsg(m_ctx, "NewReport")).append(" **");
|
||||
KeyNamePair pp = new KeyNamePair(-1, sb.toString());
|
||||
comboReport.addItem(pp);
|
||||
}
|
||||
if (selectValue != null)
|
||||
comboReport.setSelectedItem(selectValue);
|
||||
comboReport.addActionListener(this);
|
||||
|
|
|
@ -77,13 +77,13 @@ import org.zkoss.zk.ui.ext.render.DynamicMedia;
|
|||
import org.zkoss.zul.A;
|
||||
import org.zkoss.zul.Borderlayout;
|
||||
import org.zkoss.zul.Center;
|
||||
import org.zkoss.zul.North;
|
||||
import org.zkoss.zul.Div;
|
||||
import org.zkoss.zul.Filedownload;
|
||||
import org.zkoss.zul.Hbox;
|
||||
import org.zkoss.zul.Iframe;
|
||||
import org.zkoss.zul.Listitem;
|
||||
import org.zkoss.zul.Menuitem;
|
||||
import org.zkoss.zul.North;
|
||||
import org.zkoss.zul.Separator;
|
||||
import org.zkoss.zul.South;
|
||||
import org.zkoss.zul.Tab;
|
||||
|
@ -115,7 +115,7 @@ public class ZkReportViewer extends Window implements EventListener<Event>, ITab
|
|||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -7554542090648903080L;
|
||||
private static final long serialVersionUID = 2079827289589862794L;
|
||||
|
||||
/** Window No */
|
||||
private int m_WindowNo = -1;
|
||||
|
@ -547,9 +547,14 @@ public class ZkReportViewer extends Window implements EventListener<Event>, ITab
|
|||
{
|
||||
log.log(Level.SEVERE, sql, e);
|
||||
}
|
||||
StringBuffer sb = new StringBuffer("** ").append(Msg.getMsg(Env.getCtx(), "NewReport")).append(" **");
|
||||
KeyNamePair pp = new KeyNamePair(-1, sb.toString());
|
||||
comboReport.appendItem(pp.getName(), pp.getKey());
|
||||
// IDEMPIERE-297 - Check for Table Access and Window Access for New Report
|
||||
if ( MRole.getDefault().isTableAccess(MPrintFormat.Table_ID, false)
|
||||
&& MRole.getDefault().getWindowAccess(WINDOW_PRINTFORMAT))
|
||||
{
|
||||
StringBuffer sb = new StringBuffer("** ").append(Msg.getMsg(Env.getCtx(), "NewReport")).append(" **");
|
||||
KeyNamePair pp = new KeyNamePair(-1, sb.toString());
|
||||
comboReport.appendItem(pp.getName(), pp.getKey());
|
||||
}
|
||||
comboReport.addEventListener(Events.ON_SELECT, this);
|
||||
} // fillComboReport
|
||||
|
||||
|
|
Loading…
Reference in New Issue