Creating users
From Protege Wiki
Revision as of 14:28, March 11, 2008 by TaniaTudorache (talk | contribs) (New page: __NOTOC__ == Creating users programmatically in client-server mode == In client-server mode (multi-user mode), one can create a user/password programmatically with the following code: <c...)
Creating users programmatically in client-server mode
In client-server mode (multi-user mode), one can create a user/password programmatically with the following code:
try {
server = (RemoteServer) Naming.lookup("//" + serverName + "/" + Server.getBoundName());
//optional - check if the server allows the creation of new users
//boolean allowsUserCreate = server.allowsCreateUsers();
server.createUser(username, password);
} catch (Exception e) {
Log.getLogger().severe(Log.toString(e));
}
After creating a new user, the server will automatically save the metaproject file.
Note:
The server is configured by default not to allow the creation of new users in the UI (this does not apply to the programmatic access). To enable the creation of users in the UI, add in the protege.properties file from the Protege installation directory the following line:
server.allow.create.users=false