Ticket #583 (closed defect: fixed)

Opened 8 years ago

Last modified 7 years ago

Adding new user with admin feature: new user properties don't display

Reported by: ak19 Owned by: ak19
Priority: moderate Milestone: 3.05 Release
Component: Greenstone3 Runtime Severity: minor
Keywords: Cc:

Description

Adding a new user using the Admininistration pages works. I set it to enabled and make the new user a personal-collections-editor. All this is the case, however it does not display in the List Users page that where the properties of all users are shown: the display for the new user does not show that their account is enabled or that they have personal-collections-editor privileges. And the properties for the Admin account appear to be display different privileges from what the Admin user has.

Change History

Changed 8 years ago by kjdon

  • milestone changed from Greenstone 3 catch-up to 3.05 Release

And check that adding users and admin works in general.

Changed 7 years ago by sjm84

  • owner changed from nobody to ak19

Changed 7 years ago by ak19

  • status changed from new to assigned

Changed 7 years ago by ak19

  • status changed from assigned to closed
  • resolution set to fixed

After a lot of hunting about, found that the file to change was GS3\web\interfaces\default\transform\authen.xsl

Code fix committed with revision 24078.

The bug was slightly weirder: when listing users via the Admin pages, the list users page would not only display some status and groups info for the admin user, but if there were other users, then the last user's status and groups would be displayed under the admin user instead.

The bug was because the ids assigned to the status and group cells were identical, and so these got successively overwritten on each pass through the user list for displaying their details.

Not sure how this ever worked before, so wasn't too sure of the solution and therefore don't know that the current fix is the most optimal kind: there may be better ways of expressing the same in xslt and javascript.

Now the current username is grabbed using xslt and stored in a Javascript variable, then used to construct the id of each status and group table cell (by concatenating the username to the static id name each time). The same Javascript username variable is used to retrieve the id again when setting the contents of the group and status table cells.

Note: See TracTickets for help on using tickets.