Commit 4f9549fc authored by Daniel Henninger's avatar Daniel Henninger Committed by dhenninger

[GATE-135] Adjusted registration methods to display actual reason for failures.

[GATE-147] Implemented AJAX based handling for registrations page.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk/src/plugins/gateway@7281 b35dd754-fafc-0310-a699-88a17e54d16e
parent 21b41a7c
...@@ -175,12 +175,19 @@ ...@@ -175,12 +175,19 @@
## Added key: 'gateway.msn.disconnect' ## Added key: 'gateway.msn.disconnect'
## Added key: 'gateway.msn.wink' ## Added key: 'gateway.msn.wink'
## Added key: 'gateway.msn.nudge' ## Added key: 'gateway.msn.nudge'
## Added key: 'gateway.web.registrations.deletesuccess'
## Added key: 'gateway.web.registrations.updatesuccess'
## Added key: 'gateway.web.registrations.addsuccess'
## Removed key: 'gateway.web.registrations.regsuccess'
## Removed key: 'gateway.web.registrations.regfailure'
## Added key: 'global.delete'
# Temporary Tags Until Fixed Properly # Temporary Tags Until Fixed Properly
login.title=Admin Console login.title=Admin Console
global.add=Add global.add=Add
global.edit=Edit global.edit=Edit
global.delete=Delete
global.cancel=Cancel global.cancel=Cancel
global.save_changes=Save Changes global.save_changes=Save Changes
...@@ -317,8 +324,6 @@ gateway.web.registrations.jid=user (JID) ...@@ -317,8 +324,6 @@ gateway.web.registrations.jid=user (JID)
gateway.web.registrations.gateway=gateway gateway.web.registrations.gateway=gateway
gateway.web.registrations.signedon=Signed on only gateway.web.registrations.signedon=Signed on only
gateway.web.registrations.update=Update gateway.web.registrations.update=Update
gateway.web.registrations.regsuccess=Registration successfully updated.
gateway.web.registrations.regfailure=Registration update failed.
gateway.web.registrations.next=Next gateway.web.registrations.next=Next
gateway.web.registrations.prev=Prev gateway.web.registrations.prev=Prev
gateway.web.registrations.remove=Remove gateway.web.registrations.remove=Remove
...@@ -334,3 +339,6 @@ gateway.web.registrations.regnotfound=Unable to find registration. ...@@ -334,3 +339,6 @@ gateway.web.registrations.regnotfound=Unable to find registration.
gateway.web.registrations.notenabled=Transport is not enabled. Please enable before attempting operation. gateway.web.registrations.notenabled=Transport is not enabled. Please enable before attempting operation.
gateway.web.registrations.illegaldomain=XMPP user account domain is not on this server. gateway.web.registrations.illegaldomain=XMPP user account domain is not on this server.
gateway.web.registrations.invaliduser=Invalid username specified for legacy service. gateway.web.registrations.invaliduser=Invalid username specified for legacy service.
gateway.web.registrations.deletesuccess=Registration successfully deleted.
gateway.web.registrations.updatesuccess=Registration successfully updated.
gateway.web.registrations.addsuccess=Registration successfully added.
...@@ -123,8 +123,8 @@ gateway.web.registrations.jid=Benutzer (JID) ...@@ -123,8 +123,8 @@ gateway.web.registrations.jid=Benutzer (JID)
gateway.web.registrations.gateway=Gateway gateway.web.registrations.gateway=Gateway
gateway.web.registrations.signedon=Nur Angemeldet gateway.web.registrations.signedon=Nur Angemeldet
gateway.web.registrations.update=Aktualisieren gateway.web.registrations.update=Aktualisieren
gateway.web.registrations.regsuccess=Registrierung erfolgreich aktualisiert. gateway.web.registrations.regsuccess=
gateway.web.registrations.regfailure=Aktualisierung fehlgeschlagen. gateway.web.registrations.regfailure=
gateway.web.registrations.next=Weiter gateway.web.registrations.next=Weiter
gateway.web.registrations.prev=Zur\u00fcck gateway.web.registrations.prev=Zur\u00fcck
gateway.web.registrations.remove=Entfernen gateway.web.registrations.remove=Entfernen
...@@ -157,4 +157,8 @@ gateway.web.registrations.xmppnotfound=Unable to find XMPP user account. ...@@ -157,4 +157,8 @@ gateway.web.registrations.xmppnotfound=Unable to find XMPP user account.
gateway.web.registrations.regnotfound=Unable to find registration. gateway.web.registrations.regnotfound=Unable to find registration.
gateway.web.registrations.notenabled=Transport is not enabled. Please enable before attempting operation. gateway.web.registrations.notenabled=Transport is not enabled. Please enable before attempting operation.
gateway.web.registrations.illegaldomain=XMPP user account domain is not on this server. gateway.web.registrations.illegaldomain=XMPP user account domain is not on this server.
gateway.web.registrations.invaliduser=Invalid username specified for legacy service. gateway.web.registrations.invaliduser=Invalid username specified for legacy service.
\ No newline at end of file gateway.web.registrations.deletesuccess=Registration successfully deleted.
gateway.web.registrations.updatesuccess=Registration successfully updated.
gateway.web.registrations.addsuccess=Registration successfully added.
global.delete=Delete
\ No newline at end of file
...@@ -123,8 +123,8 @@ gateway.web.registrations.jid=usuario (JID) ...@@ -123,8 +123,8 @@ gateway.web.registrations.jid=usuario (JID)
gateway.web.registrations.gateway=gateway gateway.web.registrations.gateway=gateway
gateway.web.registrations.signedon=Autenticado unicamente gateway.web.registrations.signedon=Autenticado unicamente
gateway.web.registrations.update=Actualizar gateway.web.registrations.update=Actualizar
gateway.web.registrations.regsuccess=La inscripcion ha sido actualizada exitosamente. gateway.web.registrations.regsuccess=
gateway.web.registrations.regfailure=La inscripcion no pudo ser actualizada. gateway.web.registrations.regfailure=
gateway.web.registrations.next=Siguiente gateway.web.registrations.next=Siguiente
gateway.web.registrations.prev=Anterior gateway.web.registrations.prev=Anterior
gateway.web.registrations.remove=Remover gateway.web.registrations.remove=Remover
...@@ -157,4 +157,8 @@ gateway.web.registrations.xmppnotfound=Unable to find XMPP user account. ...@@ -157,4 +157,8 @@ gateway.web.registrations.xmppnotfound=Unable to find XMPP user account.
gateway.web.registrations.regnotfound=Unable to find registration. gateway.web.registrations.regnotfound=Unable to find registration.
gateway.web.registrations.notenabled=Transport is not enabled. Please enable before attempting operation. gateway.web.registrations.notenabled=Transport is not enabled. Please enable before attempting operation.
gateway.web.registrations.illegaldomain=XMPP user account domain is not on this server. gateway.web.registrations.illegaldomain=XMPP user account domain is not on this server.
gateway.web.registrations.invaliduser=Invalid username specified for legacy service. gateway.web.registrations.invaliduser=Invalid username specified for legacy service.
\ No newline at end of file gateway.web.registrations.deletesuccess=Registration successfully deleted.
gateway.web.registrations.updatesuccess=Registration successfully updated.
gateway.web.registrations.addsuccess=Registration successfully added.
global.delete=Delete
\ No newline at end of file
...@@ -129,8 +129,8 @@ gateway.web.registrations.jid=user (JID) ...@@ -129,8 +129,8 @@ gateway.web.registrations.jid=user (JID)
gateway.web.registrations.gateway=gateway gateway.web.registrations.gateway=gateway
gateway.web.registrations.signedon=Enregistr\u00c8 seulement gateway.web.registrations.signedon=Enregistr\u00c8 seulement
gateway.web.registrations.update=Mise \u2021 jour gateway.web.registrations.update=Mise \u2021 jour
gateway.web.registrations.regsuccess=Enregistrement mis \u2021 jour avec succ\u00cbs. gateway.web.registrations.regsuccess=
gateway.web.registrations.regfailure=Echec de la mise \u2021 jour de l'enregistrement. gateway.web.registrations.regfailure=
gateway.web.registrations.next=Suivant gateway.web.registrations.next=Suivant
gateway.web.registrations.prev=Pr\u00c8c\u00c8dent gateway.web.registrations.prev=Pr\u00c8c\u00c8dent
gateway.web.registrations.remove=Supprimer gateway.web.registrations.remove=Supprimer
...@@ -157,4 +157,8 @@ gateway.web.registrations.xmppnotfound=Unable to find XMPP user account. ...@@ -157,4 +157,8 @@ gateway.web.registrations.xmppnotfound=Unable to find XMPP user account.
gateway.web.registrations.regnotfound=Unable to find registration. gateway.web.registrations.regnotfound=Unable to find registration.
gateway.web.registrations.notenabled=Transport is not enabled. Please enable before attempting operation. gateway.web.registrations.notenabled=Transport is not enabled. Please enable before attempting operation.
gateway.web.registrations.illegaldomain=XMPP user account domain is not on this server. gateway.web.registrations.illegaldomain=XMPP user account domain is not on this server.
gateway.web.registrations.invaliduser=Invalid username specified for legacy service. gateway.web.registrations.invaliduser=Invalid username specified for legacy service.
\ No newline at end of file gateway.web.registrations.deletesuccess=Registration successfully deleted.
gateway.web.registrations.updatesuccess=Registration successfully updated.
gateway.web.registrations.addsuccess=Registration successfully added.
global.delete=Delete
\ No newline at end of file
...@@ -123,8 +123,8 @@ gateway.web.registrations.jid=usu ...@@ -123,8 +123,8 @@ gateway.web.registrations.jid=usu
gateway.web.registrations.gateway=gateway gateway.web.registrations.gateway=gateway
gateway.web.registrations.signedon=Somente os marcados gateway.web.registrations.signedon=Somente os marcados
gateway.web.registrations.update=Atualizar gateway.web.registrations.update=Atualizar
gateway.web.registrations.regsuccess=Registro atualizado com sucesso. gateway.web.registrations.regsuccess=
gateway.web.registrations.regfailure=Falha ao atualizar o registro. gateway.web.registrations.regfailure=
gateway.web.registrations.next=Prximo gateway.web.registrations.next=Prximo
gateway.web.registrations.prev=Anterior gateway.web.registrations.prev=Anterior
gateway.web.registrations.remove=Remover gateway.web.registrations.remove=Remover
...@@ -157,4 +157,8 @@ gateway.web.registrations.xmppnotfound=Unable to find XMPP user account. ...@@ -157,4 +157,8 @@ gateway.web.registrations.xmppnotfound=Unable to find XMPP user account.
gateway.web.registrations.regnotfound=Unable to find registration. gateway.web.registrations.regnotfound=Unable to find registration.
gateway.web.registrations.notenabled=Transport is not enabled. Please enable before attempting operation. gateway.web.registrations.notenabled=Transport is not enabled. Please enable before attempting operation.
gateway.web.registrations.illegaldomain=XMPP user account domain is not on this server. gateway.web.registrations.illegaldomain=XMPP user account domain is not on this server.
gateway.web.registrations.invaliduser=Invalid username specified for legacy service. gateway.web.registrations.invaliduser=Invalid username specified for legacy service.
\ No newline at end of file gateway.web.registrations.deletesuccess=Registration successfully deleted.
gateway.web.registrations.updatesuccess=Registration successfully updated.
gateway.web.registrations.addsuccess=Registration successfully added.
global.delete=Delete
\ No newline at end of file
...@@ -280,8 +280,13 @@ public class ConfigManager { ...@@ -280,8 +280,13 @@ public class ConfigManager {
* @return Error message or null on success. * @return Error message or null on success.
*/ */
public String updateRegistration(Integer registrationID, String legacyUsername, String legacyPassword, String legacyNickname) { public String updateRegistration(Integer registrationID, String legacyUsername, String legacyPassword, String legacyNickname) {
PluginManager pluginManager = XMPPServer.getInstance().getPluginManager();
GatewayPlugin plugin = (GatewayPlugin)pluginManager.getPlugin("gateway");
try { try {
Registration reg = new Registration(registrationID); Registration reg = new Registration(registrationID);
if (!plugin.getTransportInstance(reg.getTransportType().toString()).isEnabled()) {
return LocaleUtils.getLocalizedString("gateway.web.registrations.notenabled", "gateway");
}
reg.setUsername(legacyUsername); reg.setUsername(legacyUsername);
if (legacyPassword != null) { if (legacyPassword != null) {
reg.setPassword(legacyPassword); reg.setPassword(legacyPassword);
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment