Actions
Bug #5535
closedsystem_usermanager_addprivs.php and system_groupmanager_addprivs.php perform similar functions but behave inconsistently and both in bad ways
Status:
Resolved
Priority:
Normal
Assignee:
Category:
User Manager / Privileges
Target version:
Start date:
11/25/2015
Due date:
% Done:
100%
Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
2.3
Affected Architecture:
All
Description
Both system_usermanager_addprivs.php and system_groupmanager_addprivs.php perform similar functions but behave inconsistently and both in various bad ways
system_usermanager_addprivs.php:- Not sorted properly (bad)
- Shows privilege description when clicked (good)
- Omits already-present privileges from the list so they cannot be added twice (good)
- Sorted properly -- alphabetically by privilege name (good)
- Does not show privilege description when clicked (bad)
- Pre-selects previous privileges (good -- if it was respected)
- ...but does not care if they are deselected (bad)
- Adds privileges to a group multiple times (bad!)
They should, ideally, use the same or very similar code -- perhaps by moving some of the logic to priv.inc so they can generate the list in the same way.
Ideally they both should behave identically:- Sorted properly -- alphabetically by privilege name (system_groupmanager_addprivs.php does this correctly)
- Show privilege description under the control when clicked (system_usermanager_addprivs.php does this correctly)
- Omit already-present privileges from the list so they cannot be added twice (system_usermanager_addprivs.php does this correctly)
- Do not allow the same privilege to be added to a user or group multiple times (system_usermanager_addprivs.php does this correctly as a byproduct of the above behavior)
Might also be a good time to tackle #5049
Actions