Project

General

Profile

Actions

Bug #5535

closed

system_usermanager_addprivs.php and system_groupmanager_addprivs.php perform similar functions but behave inconsistently and both in bad ways

Added by Jim Pingle about 9 years ago. Updated about 9 years ago.

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)
system_groupmanager_addprivs.php:
  • 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 #1

Updated by Anonymous about 9 years ago

  • Status changed from Confirmed to Feedback
  • Assignee changed from Anonymous to Jim Pingle

Added sorting to user privs
Added existing priv filter and description on click to groups page
Tidied up color/appearance as needed

Actions #2

Updated by Anonymous about 9 years ago

  • % Done changed from 0 to 100
Actions #3

Updated by Jim Pingle about 9 years ago

  • Status changed from Feedback to Assigned
  • Assignee changed from Jim Pingle to Anonymous

Much better!

Still three little things:
  • system_usermanager_addprivs.php appears to be doing a case-insensitive sort, while system_groupmanager_addprivs.php is sorting case sensitive -- insensitive is probably better -- either way though so long as they are consistent.
  • system_usermanager_addprivs.php has "System" for the option name when it should be "Assigned privileges"
  • Text under the option on the two pages is different, both should read "Hold down CTRL (PC)/COMMAND (Mac) key to select multiple items"
Actions #4

Updated by Anonymous about 9 years ago

Done

Actions #5

Updated by Anonymous about 9 years ago

  • Status changed from Assigned to Feedback
  • Assignee changed from Anonymous to Jim Pingle
Actions #6

Updated by Jim Pingle about 9 years ago

  • Status changed from Feedback to Resolved

Looks perfect now, thanks!

Actions

Also available in: Atom PDF