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,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);

View File

@ -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())
{

View File

@ -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();