[Solved] user group permisions

Get help with installation and running IntraMessenger
Forum rules
For readability and to easier tracking, please post a new topic by theme (questions or problems).

[Solved] user group permisions

Unread postby freeairforce » Sun Nov 03, 2013 11:48 am

Hello,
I am really exited about intramessenger but I need to do something and I can't get the hang of it.
What I need :
1 - 2 types of users, admins and guests
2 - admins and guests are distributed into groups (this I can do) ( 1 group for each department )
3 - Admins can see everybody in the group/talk with everybody
4 - Guests can only see admins in the current group. Practically I need guests not messaging other guests(guests can only message admins), I figure the best way to do this is to not be able to see/search for them.

PS : when an admin opens a chat conversation with a guest, then guests can message that admin.

THANKS A LOT !
freeairforce
 
Posts: 8
Joined: Sun Nov 03, 2013 10:42 am

Re: user group permisions

Unread postby THeUDS » Sun Nov 03, 2013 12:47 pm

Nice (hard) question ! :wink:


It's look like you may:

- use _SPECIAL_MODE_GROUP_COMMUNITY
(for #4 : users dont have to manage contacts list)

- You (server admin) manage group (on ACP) by department (#2).

- active option _ROLES_TO_OVERRIDE_PERMISSIONS
Set _ROLE_ID_DEFAULT_FOR_NEW_USER to guest id.


#4 : Need now to hide users same role (guest)... I'im looking for an a issue...
User avatar
THeUDS
 
Posts: 2311
Joined: Fri Apr 15, 2005 6:56 pm

Re: user group permisions

Unread postby freeairforce » Sun Nov 03, 2013 1:27 pm

wow super fast response :D I've tried to get the right settings yesterday for 6 hours :)

Okay man I'll try it out a bit later and get back to you.

Thanks !!!
freeairforce
 
Posts: 8
Joined: Sun Nov 03, 2013 10:42 am

Re: user group permisions

Unread postby THeUDS » Sun Nov 03, 2013 1:29 pm

#4
And now, to hide user of a role:

Download this file

Unzip 3 files

Edit file list_all_users.inc.php at row 107:
Code: Select all
      // Hide user from a role - example: users id_role=2 cannot see users id_role=1
      if (_ROLES_TO_OVERRIDE_PERMISSIONS != "")
      {
        if ($id_role == 2) // example: 2
        {
          #if ($id_role_cnt == 1) $ok = 'Ko'; // example: 1
        }
      }

Replace 2 and 1 by id role "Guest"

and remove comment (#) on begin row:
#if ($id_role_cnt == 1) $ok = 'Ko';


Make same with 2 other files:

- list_contact_online_offline.inc.php at row 354...
- list_contact_online_only.inc.php at row 363...



Replace files by new one:
/distant/include/list_all_users.inc.php
/distant/include/list_contact_online_offline.inc.php
/distant/include/list_contact_online_only.inc.php
User avatar
THeUDS
 
Posts: 2311
Joined: Fri Apr 15, 2005 6:56 pm

Re: user group permisions

Unread postby THeUDS » Sun Nov 03, 2013 6:57 pm

Example:
if guest role's id is 4 for you may have:
Code: Select all
      if (_ROLES_TO_OVERRIDE_PERMISSIONS != "")
      {
        if ($id_role == 4)
        {
          if ($id_role_cnt == 4) $ok = 'Ko';
        }
      }
User avatar
THeUDS
 
Posts: 2311
Joined: Fri Apr 15, 2005 6:56 pm

Re: user group permisions

Unread postby freeairforce » Mon Nov 04, 2013 1:02 pm

great! worked perfectly, now I'm going to make a few tweeks and reinstall the server in LAN, I'll get back to you if I encounter any issues.

THANKS !!!!!!!!!!!!!!!

IntraMessenger GREAT SOFTWARE !!!!!!!!!!!!!
freeairforce
 
Posts: 8
Joined: Sun Nov 03, 2013 10:42 am


Return to Support : problem/question

Who is online

Users browsing this forum: No registered users and 2 guests

cron