Openfire

MUC affiliation improvements

Details

  • Type: Improvement Improvement
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 3.6.4
  • Fix Version/s: 3.7.0 beta
  • Component/s: Admin Console
  • Labels:
    None
  • Acceptance Test - Add?:
    No

Description

http://www.igniterealtime.org/community/message/157461#157461

1. You have to enter full JIDs, it should default to your domain.
2. When you delete users from your server, it doesn't clean out the MUC affliations of those users.
3. It would be nice if it defaulted to 'Member' type for new additions, but that is a small nitpick. Or at least default to the last type just added on previous page submit. I find myself adding orders of magnitude more members than admins

  1. fixEscapeError.patch
    09/18/09 02:20 PM
    2 kB
    Guenther Niess
  2. removeUsernameFeature.patch
    09/18/09 03:26 PM
    1 kB
    Guenther Niess
  3. user-delete-ofmucaffiliations.txt
    05/05/08 09:13 PM
    1 kB
    Daryl Herzmann

Activity

Hide
Daryl Herzmann added a comment -

Here is a simple patch for muc-room-affiliations.jsp not to fail if only a username is entered (fixes #1).

Index: muc-room-affiliations.jsp
===================================================================
— muc-room-affiliations.jsp (revision 10169)
+++ muc-room-affiliations.jsp (working copy)
@@ -53,10 +53,15 @@
// Handle an add
if (add) {
// do validation

  • if (userJID == null || userJID.indexOf('@') == -1) {
    + if (userJID == null) { errors.put("userJID","userJID"); }

+ // No @ was found so assume this is a JID of a local user
+ if (userJID.indexOf('@') == -1) { + userJID = webManager.getXMPPServer().createJID(userJID, null).toBareJID(); + }
+
if (errors.size() == 0) {
try {
// Escape username

Show
Daryl Herzmann added a comment - Here is a simple patch for muc-room-affiliations.jsp not to fail if only a username is entered (fixes #1). Index: muc-room-affiliations.jsp =================================================================== — muc-room-affiliations.jsp (revision 10169) +++ muc-room-affiliations.jsp (working copy) @@ -53,10 +53,15 @@ // Handle an add if (add) { // do validation
  • if (userJID == null || userJID.indexOf('@') == -1) { + if (userJID == null) { errors.put("userJID","userJID"); }
+ // No @ was found so assume this is a JID of a local user + if (userJID.indexOf('@') == -1) { + userJID = webManager.getXMPPServer().createJID(userJID, null).toBareJID(); + } + if (errors.size() == 0) { try { // Escape username
Hide
Daryl Herzmann added a comment -

Regarding request #3, this would only be possible if the affliation was passed via the URL, since the action causes a page redirect. I assume the page redirect is necessary, so maybe #3 can be dropped from my RFE for now

Show
Daryl Herzmann added a comment - Regarding request #3, this would only be possible if the affliation was passed via the URL, since the action causes a page redirect. I assume the page redirect is necessary, so maybe #3 can be dropped from my RFE for now
Hide
Daryl Herzmann added a comment -

Here is a patch against trunk to fix #2, I think

Show
Daryl Herzmann added a comment - Here is a patch against trunk to fix #2, I think
Hide
Gaston Dombiak added a comment -

#1 and #2 done.

Show
Gaston Dombiak added a comment - #1 and #2 done.
Hide
Daryl Herzmann added a comment -

Hi Gato,

Thanks for #1 and #2... I am fine with dropping #3 due to code complexities and trivial nature, so feel free to close this as fixed....

daryl

Show
Daryl Herzmann added a comment - Hi Gato, Thanks for #1 and #2... I am fine with dropping #3 due to code complexities and trivial nature, so feel free to close this as fixed.... daryl
Hide
Gaston Dombiak added a comment -

#3 was punted.

Show
Gaston Dombiak added a comment - #3 was punted.
Hide
Guenther Niess added a comment -

There is a bug with patch #1. If you want to add a username with spaces this results in an exception. But I have generally doubts against this "feature", it has the drawback that you can't add JIDs which have only the domain part (e.g. bots or components maybe have a JID of the form chatbot.domain.lt).

Show
Guenther Niess added a comment - There is a bug with patch #1. If you want to add a username with spaces this results in an exception. But I have generally doubts against this "feature", it has the drawback that you can't add JIDs which have only the domain part (e.g. bots or components maybe have a JID of the form chatbot.domain.lt).
Hide
Guenther Niess added a comment -

I've wrote two patches to fix the bug. I would prefer to remove the possibility to add an JID by adding only the username. See also the bug report on the forum, thanks Brinley

Show
Guenther Niess added a comment - I've wrote two patches to fix the bug. I would prefer to remove the possibility to add an JID by adding only the username. See also the bug report on the forum, thanks Brinley
Hide
Daryl Herzmann added a comment -

Guenther,

Thanks for working on this. I am not sure I understand your issue with only adding the username. A person still could add a bot user by providing the full user@domain portion to the form.

daryl

Show
Daryl Herzmann added a comment - Guenther, Thanks for working on this. I am not sure I understand your issue with only adding the username. A person still could add a bot user by providing the full user@domain portion to the form. daryl
Hide
Guenther Niess added a comment -

Hi Daryl, a bot could be implemented as a server component, or a external component could provide some extra service for a group chat. So this could leads on adding JIDs which only constits of the domain part e.g. weatherstation.xmppserver.lt could provide a forecaster groupchat with current infos...

Show
Guenther Niess added a comment - Hi Daryl, a bot could be implemented as a server component, or a external component could provide some extra service for a group chat. So this could leads on adding JIDs which only constits of the domain part e.g. weatherstation.xmppserver.lt could provide a forecaster groupchat with current infos...
Hide
Daryl Herzmann added a comment -

Ah, I see what you are saying. Good enough

daryl

Show
Daryl Herzmann added a comment - Ah, I see what you are saying. Good enough daryl
Hide
Guenther Niess added a comment -

Fixed patch.

Show
Guenther Niess added a comment - Fixed patch.
Hide
Guus der Kinderen added a comment -

Guenther, now that you have commit access, could you resolve this issue?

Show
Guus der Kinderen added a comment - Guenther, now that you have commit access, could you resolve this issue?
Hide
Guenther Niess added a comment -

Applied fixEscapeError patch, this fixes the bug with the spaces in usernames. I suppose this will fit for the most users (special JIDs can still be configured via XMPP Data Form).

Show
Guenther Niess added a comment - Applied fixEscapeError patch, this fixes the bug with the spaces in usernames. I suppose this will fit for the most users (special JIDs can still be configured via XMPP Data Form).

People

Vote (3)
Watch (3)

Dates

  • Created:
    Updated:
    Resolved: