FR [ 1763726 ] Don't show Script for non-administrators

This commit is contained in:
Carlos Ruiz 2007-07-30 15:55:31 +00:00
parent 52ed306eaa
commit 8f8c05f7a4
3 changed files with 9 additions and 3 deletions

View File

@ -287,7 +287,9 @@ public final class APanel extends CPanel
aCalculator = addAction("Calculator", mTools, null, false);
aCalendar = addAction("Calendar", mTools, null, false);
aEditor = addAction("Editor", mTools, null, false);
aScript = addAction("Script", 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);
if (AEnv.isWorkflowProcess())

View File

@ -169,7 +169,9 @@ 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);
AEnv.addMenuItem("Script", null, null, mTools, this);
MUser user = MUser.get(Env.getCtx());
if (user.isAdministrator())
AEnv.addMenuItem("Script", null, null, mTools, this);
if (MRole.getDefault().isShowPreference())
{
mTools.addSeparator();

View File

@ -452,7 +452,9 @@ public class Viewer extends CFrame
menuBar.add(mTools);
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("Editor", null, null, mTools, this);
AEnv.addMenuItem("Script", null, null, mTools, this);
mTools.addSeparator();
AEnv.addMenuItem("Preference", null, null, mTools, this);