ejabberd - Comments for "ACLpopulateSR - Automatic Addition of Users to a Shared Roster Group" https://www.ejabberd.im/aclpopulatesr en q https://www.ejabberd.im/aclpopulatesr#comment-65244 <p>q</p> Fri, 20 Feb 2015 05:04:15 +0000 prooa comment 65244 at https://www.ejabberd.im I have the same query, want https://www.ejabberd.im/aclpopulatesr#comment-52048 <p>I have the same query, want to add some groups but in different hosts. I spend a lot doing this manually.</p> <p>This is because I'm handling more and more groups everyday. Please anyone knows??</p> <p>Regards,<br /> Locke</p> Mon, 24 Mar 2008 17:18:00 +0000 Locke comment 52048 at https://www.ejabberd.im Thanks, patch updated https://www.ejabberd.im/aclpopulatesr#comment-51200 <div class="quote-msg"> <div class="quote-author"><em>syka</em> wrote:</div> <p>Here is the code with my changes:<br /> <noindex><a href="http://docs.google.com/View?docid=dt7jfn6_0f8dxb2" rel="nofollow" >mod_shared_roster.erl</a></noindex></p></div> <p>Thanks. I've merged your changes, my improvement, rebuilt the patch for ejabberd 1.1.4 and updated the download page.</p> Fri, 09 Nov 2007 21:59:49 +0000 mfoss comment 51200 at https://www.ejabberd.im RE: Simple change to allow several ADD_ACL https://www.ejabberd.im/aclpopulatesr#comment-51179 <p>Hi,</p> <p>WELL DONE!!! This way we can add all specific users to specific shared roster group. </p> <p>With the new code we can configure ejabberd.cfg like:</p> <p>{acl, customers, {user_glob, "cus*", "example.com"}}.<br /> {access, sr_devs, [{allow, customers}]}. % Add all the users named cus*</p> <p>{acl, sale, {user_glob, "sal*", "other.com"}}.<br /> {access, sr_sal, [{allow, sale}]}.</p> <p>{mod_shared_roster, [{add_acl,[<br /> {sr_devs, "Customers", "example.com"},<br /> {sr_devs, "Clients", "other.com"},<br /> {sr_sal, "Sales", "example.com"},<br /> {sr_sal, "Sales", "other"}]}]},</p> <p>Users with specific uid = cus* from host example.com will be added to shared roster group Customers on vhost example.com and to group Clients on vhost other.com. Similarly it works with users with user name sal*. </p> <p>Here is the code with my changes:</p> <p><noindex><a href="http://docs.google.com/View?docid=dt7jfn6_0f8dxb2" rel="nofollow" >mod_shared_roster.erl</a></noindex></p> <p>Best<br /> Syka</p> Tue, 06 Nov 2007 11:27:21 +0000 syka comment 51179 at https://www.ejabberd.im Simple change to allow several ADD_ACL https://www.ejabberd.im/aclpopulatesr#comment-51175 <p>I wrote a simple change in the patch. Note that I didn't try it, in fact I didn't check if it compiles:</p> <p>Replace this old code:</p> <pre> case gen_mod:get_opt(add_acl, Opts, none) of {Access, Group, Server} -&gt; ejabberd_hooks:add(roster_get, Host, ?MODULE, add_acl, 65), add_acl_start(Host, Access, Group, Server); _ -&gt; ok end,</pre><p>with this new code:</p> <pre> case gen_mod:get_opt(add_acl, Opts, none) of {Access, Group, Server} -&gt; ejabberd_hooks:add(roster_get, Host, ?MODULE, add_acl, 65), add_acl_start(Host, Access, Group, Server); List_AGS when is_list(List_AGS) -&gt; ejabberd_hooks:add(roster_get, Host, ?MODULE, add_acl, 65), [add_acl_start(Host, Access, Group, Server) || {Access, Group, Server} &lt;- List_AGS]; _ -&gt; ok end,</pre><p> With this change, add_acl accepts either a tuple or a list of tuples. For example, now this is also valid:</p> <pre>{mod_shared_roster, [ {add_acl, [ {sr_devs, "Clients", "example.com"}, {sr_devs, "zCustomers","other.com"} ] } ]},</pre><p> This is similar to what you wanted. Please remember that I didn't try it at all.</p> <p>Let's hope it works. If you finally get all working, consider publishing the code here :)</p> Mon, 05 Nov 2007 09:33:17 +0000 mfoss comment 51175 at https://www.ejabberd.im how many groups https://www.ejabberd.im/aclpopulatesr#comment-51157 <p>I have a question. This path for mod_shared_roster in original version was suppose to serve only one group in shared roster? is it possible to add to this functionality to many groups, like: </p> <p>{mod_shared_roster, [{add_acl, {sr_devs, "Clients", "example.com"}},<br /> {add_acl, {sr_devs, "zCustomers","other.com"}}]},</p> <p>with:<br /> {acl, customers, {user_glob, "cus*", "example.com"}}.<br /> {access, sr_devs, [{allow, customers}]}. </p> <p>The point is to add the same group of users to the shared roster groups on different vhosts. I'm trying to add this functionality because shared roster works only within one vhost. I have group of users on 2nd vhost which have to be visible on 1st vhost. The group is huge this is why manual adding doesn't make sense.<br /> Any ideas ??</p> Wed, 31 Oct 2007 12:26:18 +0000 syka comment 51157 at https://www.ejabberd.im Re: Not tested with 1.1.x https://www.ejabberd.im/aclpopulatesr#comment-51150 <p>Yes i tried with ejabberd 1.1.2. The patch doesn't work, so i modified mod_shared_roster.erl file according to the patch, made some changes, compile it and exchange with actual module. It works, but additionally cause problems with &lt;pressence&gt;, i'm working on it.</p> <p>I found this functionality very useful. We have few groups in shared roster, most of them with not many users so we can add them easly, but one is big with more than 100 users. Adding manually all the users to that group is not funny. So if we set:</p> <pre>{acl, customers, {user_glob, "cus*", "example.com"}}. {access, sr_devs, [{allow, customers}]}.</pre><p> and </p> <pre> {mod_shared_roster, [{add_acl, {sr_devs, "Customers", "example.com"}}]},</pre><p> than every user whith JID starting with 'cus' on 'example.com' serwer, will be added to that group.<br /> But as i said, it has some bug, and i'm trying to figure that out. </p> <p>Would be great if in web admin in shared roster option, during setting users for specific group, global options like '*' or '?' (ex: *cus*.example.com) would be available. That's a tip for the next version of ejabberd. </p> <p>By the way. Ejabberd rulessss!!!!!!!!! :))</p> Mon, 29 Oct 2007 12:53:32 +0000 syka comment 51150 at https://www.ejabberd.im Not tested with 1.1.x https://www.ejabberd.im/aclpopulatesr#comment-51147 <div class="quote-msg"> <div class="quote-author"><em>syka</em> wrote:</div> <p>Is this mod</p></div> <p>This is a patch for mod_shared_roster. This is not a new module.</p> <div class="quote-msg"> <div class="quote-author"><em>syka</em> wrote:</div> <p>working with ejabberd 1.1.2 or it was only a contribution for ejabberd 0.9.8??</p></div> <p>It was developed for 0.9.8. Did you check if it still applies and works with 1.1.2?</p> <div class="quote-msg"> <div class="quote-author"><em>syka</em> wrote:</div> <p>If it was a contribution only for ejabberd 0.9.8, how we can make the same functionality in later ejabberd editions.</p></div> <p>I thought that functionality was not much required, since ejabberd 1.1.x has support for @all@. Do you think this patch provides an interesting feature today?</p> Mon, 29 Oct 2007 11:47:52 +0000 mfoss comment 51147 at https://www.ejabberd.im how this contribution works with ejabberd 1.1.2 https://www.ejabberd.im/aclpopulatesr#comment-51132 <p>Is this mod working with ejabber 1.1.2 or it was only a contribution for ejabberd 0.9.8??</p> <p>If it was a contribution only for ejabberd 0.9.8, how we can make the same functionality in later ejabberd editions.</p> <p>Thanks</p> Fri, 26 Oct 2007 12:26:05 +0000 syka comment 51132 at https://www.ejabberd.im I'll be more than happy to see the code https://www.ejabberd.im/aclpopulatesr#comment-694 <p>I'll be more than happy to test and review such code when IBM, other big corporation or anybody else with enought free time implements it for their particular interests and releases it as Free Software, like we do.</p> Fri, 05 Aug 2005 10:26:20 +0000 mfoss comment 694 at https://www.ejabberd.im Idea: using vCard data to populate groups automatically https://www.ejabberd.im/aclpopulatesr#comment-692 <p>It would be nice if users gets automatically in the shared group they want if they edit their vCard. Examples:</p> <ol> <li>The admin creates the groups 'managers' and 'workers'.</li> <li>He selects in the web interface from a drop-down box 'Based on role' and adds 'manager' for the group 'managers', and 'worker' for the group 'workers'.</li> <li>If now managers change their vCard so that it contains '&lt;ROLE&gt;manager&lt;/ROLE&gt;' (see JEP-0054) and for workers, '&lt;ROLE&gt;worker&lt;/ROLE&gt;', they will be automatically added to the right groups.</li> <li>Managers can now chat with all other managers, and workers with all workers.</li> </ol> <p>The same can be done with the vCard element '&lt;ORGUNIT/&gt;'. E.g., '&lt;ORGUNIT&gt;marketing&lt;/ORGUNIT&gt;' to get all members of the marketing unit in the same group. Remark that people can get by using vCard data in different groups very easy and they can easy move between groups. E.g. if a manager moves to another unit, he can easily get to the new shared roster group, while still being able to chat with other managers. Other cool example:<br /> A manager that moves to another unit:<br /> &lt;ORGNAME&gt;IBM&lt;/ORGNAME&gt;<br /> &lt;ORGUNIT&gt;EMEA&lt;/ORGUNIT&gt;<br /> &lt;ORGUNIT&gt;marketing&lt;/ORGUNIT&gt;</p> <p>Later:<br /> &lt;ORGNAME&gt;IBM&lt;/ORGNAME&gt;<br /> &lt;ORGUNIT&gt;AP&lt;/ORGUNIT&gt;<br /> &lt;ORGUNIT&gt;marketing&lt;/ORGUNIT&gt;</p> <p>--<br /> sander</p> Thu, 04 Aug 2005 21:31:10 +0000 sander comment 692 at https://www.ejabberd.im