Details

    • Type: Improvement
    • Status: Closed
    • Priority: Low
    • Resolution: Fixed
    • Affects Version/s: ejabberd 1.1.0, ejabberd 1.1.1, ejabberd 1.1.2, ejabberd 1.1.3
    • Fix Version/s: ejabberd 13.12
    • Component/s: Shared rosters
    • Labels:
      None

      Description

      I think some users would like to see the possibility to set access rules to
      mod_roster similar to mod_register. In this way they can deny all users besides
      specified users to have their own roster items. This can be useful in
      combination with mod_shared_roster.

      1. ejab72-roster-access.diff
        5 kB
        Badlop
      2. ejab72-roster-access.diff
        7 kB
        Badlop
      3. ejab72-roster-access.diff
        6 kB
        Badlop
      4. ejab72-roster-access.diff
        8 kB
        Badlop

        Activity

        Hide
        badlop Badlop added a comment - - edited

        This patch implements 'access' option in mod_roster, mod_roster_odbc and it's also used in ejabberd_c2s.

        Users that are denied by that access rule cannot add/modify/delete roster items, or subscribe/unsubscribe.

        Includes documentation for the guide.

        This patch is for current ejabberd trunk.

        This patch was mentioned in http://www.ejabberd.im/node/3173

        Show
        badlop Badlop added a comment - - edited This patch implements 'access' option in mod_roster, mod_roster_odbc and it's also used in ejabberd_c2s. Users that are denied by that access rule cannot add/modify/delete roster items, or subscribe/unsubscribe. Includes documentation for the guide. This patch is for current ejabberd trunk. This patch was mentioned in http://www.ejabberd.im/node/3173
        Hide
        badlop Badlop added a comment -

        Patch modified for ejabberd 3, and committed to ejabberd master branch in git.

        Show
        badlop Badlop added a comment - Patch modified for ejabberd 3, and committed to ejabberd master branch in git.
        Hide
        badlop Badlop added a comment -

        Attached a new patch that applies correctly to ejabberd 2.1.5.

        Show
        badlop Badlop added a comment - Attached a new patch that applies correctly to ejabberd 2.1.5.
        Hide
        badlop Badlop added a comment -

        Attached a new patch that includes this fix:

        diff --git a/src/mod_roster.erl b/src/mod_roster.erl
        index 90c4601..1d25f7e 100644
        --- a/src/mod_roster.erl
        +++ b/src/mod_roster.erl
        @@ -1074,7 +1084,7 @@ user_roster_item_parse_query(User, Server, Items, Query) ->
         			     "remove" ++ ejabberd_web_admin:term_to_id(JID), 1, Query) of
         			  {value, _} ->
         			      UJID = jlib:make_jid(User, Server, ""),
        -			      process_iq(
        +			      process_iq_set(
         				UJID, UJID,
         				#iq{type = set,
         				    sub_el = {xmlelement, "query",
        

        Fix is committed to master branch.

        Show
        badlop Badlop added a comment - Attached a new patch that includes this fix: diff --git a/src/mod_roster.erl b/src/mod_roster.erl index 90c4601..1d25f7e 100644 --- a/src/mod_roster.erl +++ b/src/mod_roster.erl @@ -1074,7 +1084,7 @@ user_roster_item_parse_query(User, Server, Items, Query) -> "remove" ++ ejabberd_web_admin:term_to_id(JID), 1, Query) of {value, _} -> UJID = jlib:make_jid(User, Server, ""), - process_iq( + process_iq_set( UJID, UJID, #iq{type = set, sub_el = {xmlelement, "query", Fix is committed to master branch.
        Hide
        badlop Badlop added a comment -

        Patch updated to ejabberd 2.1.13

        Show
        badlop Badlop added a comment - Patch updated to ejabberd 2.1.13

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development