Tours and User Permissions - how does it work in 7.8 and up?
The new Back Office Tours feature is great in Umbraco 7.8. However, currently I only seem to get the option to see any tour if I log in as Admin. I've created another user - called "client" - who has access to Content, Media and Users. But when I log in as this user I don't get any option to see any tour - it's not there.
Ideally I'd like a user to see tours relevant to what sections they can see - so if a user has access to Content they should only see how to create content tour and not tours about creating doc types etc.
I can see in /config/BackOfficeTours/getting-started.json that there is field called requiredSections that lists sections, but not clear how it works. For instance, create content has this:
So does this mean the user must be in ALL those groups to see the Create Content tour? I've tried editing this to just leave "content" but it still didn't show for my "client" user. So I'm a bit confused. (I'm using Umbraco 7.8.1).
Can we target tours to particular user groups / permissions?
If so, how do we do it?
Can we edit the existing tours so particular users see only the tours
relevant to what sections they can access?
How odd Dan,
But from the source code of Umbraco this is how we deal with it in code. So the current user needs to have access to ALL sections specified in the requiredSections of the tour JSON object.
Also triple check browser caches & the likes to make sure everything does work as expected. Have you tried logging in as another user who has less permissions than you to see if it shows correctly as you would expect.
Thanks Warren, that explains how the sections work. From what Mads says, though, the default back-end tour has dependencies on other tours, so I guess that is why a user has to have access to all sections to see the tour.
Yes, a user needs access to all the required sections to be able to see the tours in that group. All tours in a group have to be completed in sequence so you can make sure the correct meta data / content is available for the tours. Ex: the content created in the “Create content”-tour is based on the doc types form the "Create document type”-tour, and the templates will render content from the “Create content”-tour. So it wouldn’t make sense to allow editors to see the “Create content”-tour without the others.
The only permissions we have for tours at this point are the sections but targeting a tour to a specific user group sounds pretty awesome.
Ahh, I see - so each tour can have a dependency on having seen a previous tour. That explains why even the Content tour requires access to other sections.
I guess I was hoping for something that we can use with clients (ie. editors who usually just have access to Content and Media) to give them an overview of those areas. But we'll just have to use Dave's awesome looking tour editor to create something bespoke!
I'm definitely going to be using that some time in the future, once we have decided what the content for the tour will be. Looks much easier than messing around with JSON! #h5yr
Tours and User Permissions - how does it work in 7.8 and up?
The new Back Office Tours feature is great in Umbraco 7.8. However, currently I only seem to get the option to see any tour if I log in as Admin. I've created another user - called "client" - who has access to Content, Media and Users. But when I log in as this user I don't get any option to see any tour - it's not there.
Ideally I'd like a user to see tours relevant to what sections they can see - so if a user has access to Content they should only see how to create content tour and not tours about creating doc types etc.
I can see in
/config/BackOfficeTours/getting-started.json
that there is field calledrequiredSections
that lists sections, but not clear how it works. For instance, create content has this:So does this mean the user must be in ALL those groups to see the Create Content tour? I've tried editing this to just leave "content" but it still didn't show for my "client" user. So I'm a bit confused. (I'm using Umbraco 7.8.1).
How odd Dan, But from the source code of Umbraco this is how we deal with it in code. So the current user needs to have access to ALL sections specified in the requiredSections of the tour JSON object.
Also triple check browser caches & the likes to make sure everything does work as expected. Have you tried logging in as another user who has less permissions than you to see if it shows correctly as you would expect.
https://github.com/umbraco/Umbraco-CMS/blob/7ee510ed386495120666a78c61497f58ff05de8f/src/Umbraco.Web/Editors/TourController.cs#L71
Thanks Warren, that explains how the sections work. From what Mads says, though, the default back-end tour has dependencies on other tours, so I guess that is why a user has to have access to all sections to see the tour.
Yes, a user needs access to all the required sections to be able to see the tours in that group. All tours in a group have to be completed in sequence so you can make sure the correct meta data / content is available for the tours. Ex: the content created in the “Create content”-tour is based on the doc types form the "Create document type”-tour, and the templates will render content from the “Create content”-tour. So it wouldn’t make sense to allow editors to see the “Create content”-tour without the others.
The only permissions we have for tours at this point are the sections but targeting a tour to a specific user group sounds pretty awesome.
You can always extend the tours with your own custom tours which are tailored to your specific solution. See more here: https://our.umbraco.org/apidocs/ui/#/api/umbraco.directives.directive:umbTour
Ahh, I see - so each tour can have a dependency on having seen a previous tour. That explains why even the Content tour requires access to other sections.
I guess I was hoping for something that we can use with clients (ie. editors who usually just have access to Content and Media) to give them an overview of those areas. But we'll just have to use Dave's awesome looking tour editor to create something bespoke!
And of course you can try the beta version of my UI for creating tours : https://github.com/dawoe/umbraco-tour-editor
But I have to warn you...still a work in progress.
Dave
I'm definitely going to be using that some time in the future, once we have decided what the content for the tour will be. Looks much easier than messing around with JSON! #h5yr
is working on a reply...