Is there an api to unregister a user from RAM ?
I tried the following
Option 1:
*********************************************************
RAMUser user = session.getUser(email);
session.remove(user);
session.put(user, new RAMStatusMonitor());
*********************************************************
Option 2:
*********************************************************
RAMUser user = session.getUser(email);
user.setAction(RAMAction.DELETE)
session.put(user, new RAMStatusMonitor());
*********************************************************
Both the options do not work.
Can you please tell me how i can achieve this ?
Option 1:
*********************************************************
RAMUser user = session.getUser(email);
session.remove(user);
session.put(user, new RAMStatusMonitor());
*********************************************************
Option 2:
*********************************************************
RAMUser user = session.getUser(email);
user.setAction(RAMAction.DELETE)
session.put(user, new RAMStatusMonitor());
*********************************************************
Both the options do not work.
Can you please tell me how i can achieve this ?
2 answers
You can not "remove/delete" user registrations.
There is no API to "register" a user ... a user will be registered once they are logged in from the UI.
I can't remember, but it may be that if you are using the Admin uid, and onBehalfOfUserId Session... it may register that user.
There is no API to "register" a user ... a user will be registered once they are logged in from the UI.
I can't remember, but it may be that if you are using the Admin uid, and onBehalfOfUserId Session... it may register that user.
RAMSession
public RAMSession(java.lang.String ramLocation, java.lang.String userName, java.lang.String password, java.lang.String onBehalfOfUserId) throws RAMRuntimeException
There is no remove user.
If you are using LDAP then when they are removed from LDAP the next time RAM does a user sync (which is by default every Saturday) the user will be marked as Not Found. But they are not removed from RAM. Since they are no longer in LDAP they cannot log in either.
If you are using the filesystem users then you can remove the user from the file and restart Websphere. Now the user cannot log in, though the userid stays in RAM.
If you are using LDAP then when they are removed from LDAP the next time RAM does a user sync (which is by default every Saturday) the user will be marked as Not Found. But they are not removed from RAM. Since they are no longer in LDAP they cannot log in either.
If you are using the filesystem users then you can remove the user from the file and restart Websphere. Now the user cannot log in, though the userid stays in RAM.
Comments
I used the following code to register a user.
RAMUser user = session.getUser(email);
if (!user.isRegistered()) {
user.setName(name);
user.setEmail(email);
session.put(user, new RAMStatusMonitor());
}
Also there is an api to update a user.
But i wanted to know how to unregister him using an api.
Is that possible ?
There is no way to unregister user. There is no API, there is no UI. None.
Comments
Manjiri Kamat
Jun 10 '13, 2:29 a.m.I am using RAM 7.5.1.1.