U4-10227 - Users section should start in the user tree

Created by Søren Kottal 02 Aug 2017, 17:47:55 Updated by Claus Jensen 17 Aug 2017, 09:23:36

Subtask of: U4-8632

At first I was a bit confused on how to edit/add users in the new user section. Then it hit me, that if I clicked Users in the tree, the userlist would show up.

Maybe the section should just start there?

1 Attachments

Comments

Shannon Deminick 07 Aug 2017, 08:29:30

We need to check for dashboards in the User section - if there are dashboards assigned and the current user has access then we will show the dashboard otherwise we will redirect to the user tree.


Shannon Deminick 10 Aug 2017, 07:54:34

PR: https://github.com/umbraco/Umbraco-CMS/pull/2120

So some logic changed here:

  • The section controller when looking up sections will also lookup the available dashboards per section and for the user and if there is nothing to show for a section it will add a custom 'routePath' to the section, this route path will be the route path defined on the first tree node for the section
  • In the umbsections.directive, we'll check if the section has a custom route path and we'll use that (based on the above)
  • In the routes.js during a route to a dashboard, we'll lookup the cached sections via the new sectionService (this is cached to the current user) and check if the section has a custom route path and use that instead. The caching part on the user is important here because we don't want to make a server side request when routing and it needs to be per user so that if the user logs out and a new user logs in in the same session, this cache will be cleared

To test:

  • look at the code
  • test going to the user's section, it will redirect to the user tree
  • test clicking on the User section container that would normally route to the dashboard - this will redirect to the user tree


Claus Jensen 11 Aug 2017, 08:37:27

Looks good. Noticed that the ?subview=users query string is kept when switching away from the Users section, but it doesn't seem to have any effect or throw any errors when browsing around the backoffice.


Shannon Deminick 17 Aug 2017, 08:06:37

@claus @madsrasmussen I think we can easily fix the ?subview thing when clicking on each section, we currently do something like $location.path('content') but we should do $location.path('content').search('')


Claus Jensen 17 Aug 2017, 09:23:36

fixed in https://github.com/umbraco/Umbraco-CMS/commit/f2ff1636ff1c3892f918b67f3d05bd51dd8106ba

Seems to work pretty well - confirmed query string still works in the user section and it's removed when switching to another section :)


Priority: Normal

Type: Usability Problem

State: Fixed

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions: 7.7.0

Due in version: 7.7.0

Sprint: Sprint 65

Story Points: 1

Cycle: