Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V8: It should be possible to disallow all types at content root #6580

Merged

Conversation

kjac
Copy link
Contributor

@kjac kjac commented Oct 4, 2019

Prerequisites

  • I have added steps to test this contribution in the description below

Description

This PR partially reverts #4418

As it stands we can't disallow all types at root in content and media; if no types are markes as allowed at root, all types explicitly are made available at root. #4414 called for this feature to help newcomers, and however sympathetic that is, it's kinda bad not being able to lock down the editors at root level, specially for content.

Here's how it currently works:

disallow-at-root-before

With this PR, you explicitly need to allow content types at root before they're made available (for this PR I have opted to keep the behavior as-is for media):

disallow-at-root-after

This also applies to move and restore operations:

disallow-at-root-after-move

As for aiding newcomers, #6573 is specifically aimed at this and, and even though it's primarily centered around blank installs it will also work for this scenario.

Testing this PR

  1. For content, make sure you can disallow every all content types at root level.
  2. Once disallowed, make sure you can't move any content types to the root level.
  3. For media, verify that you can still create any media type at root level if no media types are allowed at root level.

@nul800sebastiaan
Copy link
Member

In #4414 the scenario is: a developer new to Umbraco just created a doctype and it's not showing up. #6573 then tells them: hey, you need to create a document type here in order to add something.

So I would suggest that #6573 looks for existing document types and suggests updating the permissions. Maybe an extra button that takes you to the settings section?

@kjac
Copy link
Contributor Author

kjac commented Oct 6, 2019

@nul800sebastiaan while this PR and #6573 are designed to compliment each other, I didn't want to be presumptuous by expecting both to be accepted 😄

If they are indeed both accepted, I would suggest the following changes to #6573

  1. Update the wording a bit, so it hints at the option to edit the permissions of existing doctypes in instead of creating a new one.
  2. Look into making "Allow at root" default true for the first doctype created, as this is likely to be the case anyway.

I wouldn't add an extra button though, the top menu does a top job at taking people to the settings section.

@nul800sebastiaan
Copy link
Member

nul800sebastiaan commented Oct 15, 2019

@kjac In order to help with number 1 I've added a few more things to this PR: fca68e1

This looks like this when there are existing doctypes but none are allowed at root

image

(screenshot says Allow "at" root, but I corrected the translation to "as")

What do you think?

I think this is good for now, I am not sure about number 2 (first doctype allowed at root by default) but that's a different issue.

@kjac
Copy link
Contributor Author

kjac commented Oct 15, 2019

That's awesome @nul800sebastiaan 😀

@nul800sebastiaan nul800sebastiaan merged commit 8a85c3c into umbraco:v8/dev Oct 15, 2019
@kjac kjac deleted the v8/fix/disallow-all-types-at-root branch October 15, 2019 16:19
emmaburstow pushed a commit that referenced this pull request Oct 27, 2019
…ton (#6561)

* Improves accessability of the three dot tree options button

* Updated list view headers styling to have the link/hand cursor visible only if the header is sortable (and hence clicking has an effect)

* Allows members to be ordered by additional system fields (#6575)

* Fix ContentType.Alias matching in PublishedContentExtensions an… (#6577)

* Fixes an error in #6538 by moving the colon character to the sr-only span

* V8: Move misplaced colon in language selector (#6692)

* V8: It should be possible to disallow all types at content root (#6580)

* Pick macro parameters in an infinite editor like content type properties (#6586)

* Reload node children after publishing with descendants

* Correct URL decoding of macro partial view names (#6592)

* Fix semantics for list views (#6595)

* fixes test

* fixing tests

* Improved menu context
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants