Permissions: Can View Permissions Assigned to Users

Description

Purpose: Improve permissions handling so that assigned permissions control what options are presented to the user within FOLIO (currently all options are presented and you get an error when you attempt something you don't have rights to). The focus of this story is the "Can view permissions assigned to users" permission. Other stories will be added for other permissions.

Scenarios:

  1. Scenario

    • Given User A has been assigned the "Can view permissions assigned to users" permission ONLY

    • When FOLIO is displayed

    • Then User A has the following rights:

      • Users app is visible in Recent Applications Toolbar

      • Basic user data can be searched and filtered in Users app*

      • Restricted user data can be searched and filtered in the Users app*

      • Basic user fields can be viewed*

      • Restricted user fields can be viewed*

      • Direct linking to User search, results and details is allowed

      • Can view permissions assigned to users

      • *NOTE: Items with asterisk assume we have implemented the distinction between basic and restricted fields. If we haven't yet done that, we can consolidate.

  2. Scenario

    • Given User A has been assigned the "Can view permissions assigned to users" permission ONLY

    • When FOLIO is displayed

    • Then User A does NOT have the following rights:

      • User Edit button/icon is visible

      • Basic user fields can be edited*

      • Restricted user fields can be edited*

      • Direct linking to Edit User page is allowed

      • Create new user button is visible

      • User creation is permitted

      • Direct linking to Create User page is allowed

      • Can assign and unassign permissions to users

      • Settings app is visible in Recent Applications Toolbar

      • "User permissions" link is visible under Settings > Users

      • User permission sets can be created, read, updated and deleted

      • *NOTE: Items with asterisk assume we have implemented the distinction between basic and restricted fields. If we haven't yet done that, we can consolidate.

  3. Scenario

    • Given I don't have rights to direct link to Page A

    • When I direct link to page A (e.g. I paste the url into my browser)

    • Then I should see the following message:

      • Header/Title: Permission Error

      • Text: Sorry - your user permissions do not allow access to this page.

      • NOTE: This is an edge case and it doesn't need to be pretty, but we do need to make sure it works so there's no back door to access things you shouldn't be able to access. We're flexible on how we do this.

  4. Scenario

    • Given User A has been assigned the "Can view permissions assigned to users" permission AND another permission or set

    • When FOLIO is displayed

    • Then User A shall have the cumulative set of rights from all assigned permissions

Additional Info: A graphical representation of the rights by base permission can be found in this google sheet. Please note that the scope of the sheet is much larger than this particular story (and even includes some items that are out of scope for v1). Please reference the scenarios in this story for story scope.

Environment

None

Potential Workaround

None

Checklist

hide

TestRail: Results

Activity

Show:

Mike Taylor March 29, 2017 at 4:07 PM

I have verified that this now works correctly: when the logged-in user lacks the perms.users.read permission, then when viewing user their permissions are simply not displayed. No error message. So we are – finally! – done here.

Mike Taylor March 29, 2017 at 3:10 PM

Now that all the subtasks I described five comments ago have been either resolved or moved into their own new issues, this one is back (where it should always have been) as just implementing the Library Application part – ensuring other users' permissions can be seen only if the logged-in user has permission to see them. Hopefully that will be trivial now.

Mike Taylor March 28, 2017 at 2:20 PM

Thanks, BTW. It's useful to have a second brain on this.

Mike Taylor March 28, 2017 at 2:20 PM

Hmm, so you think I am getting a componentWillReceiveProps and then a componentWillMount? Could be true. I will try to determine this experimentally.

Jason Skomorowski March 28, 2017 at 2:05 PM

Presumably because one of the additional props you're propagating is changing in a way that triggers it before remounting?

Done

Details

Assignee

Reporter

Priority

Sprint

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs
Created March 2, 2017 at 3:37 PM
Updated May 8, 2017 at 11:46 AM
Resolved March 29, 2017 at 4:08 PM
TestRail: Cases
TestRail: Runs

Flag notifications