Questions asked by anphunlhttps://answers.axonivy.com/questions/asked-by/48/anphunl/?type=rssQuestions asked by <a href="/users/48/anphunl" >anphunl</a>enWed, 15 Jan 2014 11:10:28 -0500How can we change authentication scope?https://answers.axonivy.com/questions/253/how-can-we-change-authentication-scope<p>Panda team is developing a Web application to change the configuration of Ivy server. <img alt="alt text" src="/upfiles/Capture.PNG"> </p> <p>We are creating the login step, so that just the Ivy Admin can access our page. Could you please tell us how to authenticate with the Ivy Administrator account (like the picture at the bottom)</p> <p>Panda team tried to do :</p> <pre><code>public static AuthenticationException login(ISession session, String userName, String password) throws PersistencyException { try { session.authenticateSessionUser(userName, new Password(password)); return null; } catch(AuthenticationException ex) { return ex; } } </code></pre> <p>The result is we just can login with the accounts (IUser) of our application, not the account to manage the server.</p> <p>Please help us. Thank you very much</p> <p><img alt="Login" src="/upfiles/login.PNG"></p>anphunlWed, 15 Jan 2014 11:10:28 -0500https://answers.axonivy.com/questions/253/how-can-we-change-authentication-scopeauthenticationHow to change the value of global variable of a selected environment programmatically and keep the default value?https://answers.axonivy.com/questions/227/how-to-change-the-value-of-global-variable-of-a-selected-environment-programmatically-and-keep-the-default-value<p>I tried to change the value of global variable like that:</p> <pre><code>public static void updateGlobalVariableValue(final String globalName,final String globalValue,final IEnvironment environment) throws Exception { SecurityManagerFactory.getSecurityManager().executeAsSystem(new Callable&lt;Void&gt;() { @Override public Void call() throws Exception { IGlobalVariable variable = environment.findGlobalVariable(globalName); if (variable != null) { variable.setValue(globalValue); } return null; } }); } </code></pre> <p>If in the selected environment, we didn't set the value of that variable, after execute my function, the default value of the global variable is changed.</p> <p>Is it a bug of API or I did the wrong way? Could you please show me the way to modify just the value of global variable in the selected environment and keep the default value?</p> <p>Thank you very much, Phu Nguyen</p>anphunlFri, 03 Jan 2014 10:59:04 -0500https://answers.axonivy.com/questions/227/how-to-change-the-value-of-global-variable-of-a-selected-environment-programmatically-and-keep-the-default-valueglobalvariable