FR [ 1763726 ] Don't show Script for non-administrators
This commit is contained in:
parent
52ed306eaa
commit
8f8c05f7a4
|
@ -287,6 +287,8 @@ public final class APanel extends CPanel
|
|||
aCalculator = addAction("Calculator", mTools, null, false);
|
||||
aCalendar = addAction("Calendar", mTools, null, false);
|
||||
aEditor = addAction("Editor", mTools, null, false);
|
||||
MUser user = MUser.get(Env.getCtx());
|
||||
if (user.isAdministrator())
|
||||
aScript = addAction("Script", mTools, null, false);
|
||||
if ("Y".equals(Env.getContext(m_ctx, "#SysAdmin"))) // set in DB.loginDB
|
||||
aWinSize = addAction("WinSize", mTools, null, false);
|
||||
|
|
|
@ -169,6 +169,8 @@ public class FormFrame extends CFrame
|
|||
AEnv.addMenuItem("Calculator", null, null, mTools, this);
|
||||
AEnv.addMenuItem("Calendar", null, null, mTools, this);
|
||||
AEnv.addMenuItem("Editor", null, null, mTools, this);
|
||||
MUser user = MUser.get(Env.getCtx());
|
||||
if (user.isAdministrator())
|
||||
AEnv.addMenuItem("Script", null, null, mTools, this);
|
||||
if (MRole.getDefault().isShowPreference())
|
||||
{
|
||||
|
|
|
@ -452,6 +452,8 @@ public class Viewer extends CFrame
|
|||
menuBar.add(mTools);
|
||||
AEnv.addMenuItem("Calculator", null, null, mTools, this);
|
||||
AEnv.addMenuItem("Calendar", null, null, mTools, this);
|
||||
MUser user = MUser.get(Env.getCtx());
|
||||
if (user.isAdministrator())
|
||||
AEnv.addMenuItem("Editor", null, null, mTools, this);
|
||||
AEnv.addMenuItem("Script", null, null, mTools, this);
|
||||
mTools.addSeparator();
|
||||
|
|
Loading…
Reference in New Issue