4images Forum & Community

4images Help / Hilfe => Bug Fixes & Patches => Topic started by: V@no on December 30, 2005, 03:35:15 AM

Title: [1.7 / 1.7.1] Changes in user permissions might update a usergroup the user in
Post by: V@no on December 30, 2005, 03:35:15 AM
This bug accur only when a member was added into a usergroup and then admin update/change that member's permissions, in some cases it will update/change the usergroup permissions as well.
To test it do the following:
1) register a new account on register.php page (not in ACP!)
2) in ACP set any permission in one category to "Private"
3) create a new usergroup "test"
4) in ACP find the new user account and add it to "test" usergroup
5) edit permissions for the user, and change any of the available permissions.
6) edit usergroup "test", the changes saved from user's permissions (step 5) affected the permissions of this usergroup.

To fix that do the following:

In admin/usergroups.php find:
Code: [Select]
            WHERE gm.user_id = $user_id AND g.group_id = gm.group_id";Replace with:
Code: [Select]
            WHERE gm.user_id = $user_id AND g.group_id = gm.group_id AND g.group_type = ".GROUPTYPE_SINGLE;
Title: Re: [1.7 / 1.7.1] Changes in user permissions might update a usergroup the user in
Post by: 8o8o8.com on June 20, 2006, 09:53:59 AM
thankx