New User and User Edit Button Displaying When They Shouldn't

Description

Overview: I can log in as a user without "Can create" and "Can edit" but still see the add new button and edit icon. This is a regression, as it was working before.

Steps to repro:

  1. Log in as diku_admin

  2. Create or modify a user so they have the permissions shown in the attached screenshot

  3. Log out and back in as the user with those permissions

Expected: "Add new user" button and edit user icon should not display because the user doesn't have the permissions needed for those functions.

Actual: Both the Add new and edit buttons are visible.

Additional information: Happily, I am unable to see the "User permissions" section of the user details page without the required "Can view permissions for a user" so that part of the UI is properly responding

CSP Request Details

None

CSP Rejection Details

None

Potential Workaround

None

Attachments

1

Checklist

hide

TestRail: Results

Activity

Show:

Niels Erik Nielsen March 31, 2017 at 1:24 PM

Done. (and IfPermission working for diku_admin on my box again)

Niels Erik Nielsen March 31, 2017 at 12:48 PM
Edited

Oh, it was a mistake to commit them, I just had to take them out for a while because they were not working (diku_admin had edit user privileges according to the list but did not get the buttons, and I was supposed to work on the add and edit forms).

I'll put them back in, in the git repo at least.

Mike Taylor March 31, 2017 at 12:43 PM

This regression was introduced in commit 9b11f365, where Niels Erik removed the <IfPermission> guards from around the New user and Edit user buttons while making a change described as Change label of "Username" to "User ID"

, was this just a mistake, or did you have a reason for doing this? (I want to avoid just shoving them back in, only to find that you take them back out again for a reason I've not discerned )

Done

Details

Assignee

Reporter

Labels

Priority

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs

Created March 30, 2017 at 3:25 PM
Updated March 31, 2017 at 1:24 PM
Resolved March 31, 2017 at 1:08 PM
TestRail: Cases
TestRail: Runs