-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Can't submit modules in DTGE after Umbraco patch if user has Start Nodes configured #15460
Comments
Hi there @lukehook! Firstly, a big thank you for raising this issue. Every piece of feedback we receive helps us to make Umbraco better. We really appreciate your patience while we wait for our team to have a look at this but we wanted to let you know that we see this and share with you the plan for what comes next.
We wish we could work with everyone directly and assess your issue immediately but we're in the fortunate position of having lots of contributions to work with and only a few humans who are able to do it. We are making progress though and in the meantime, we will keep you in the loop and let you know when we have any questions. Thanks, from your friendly Umbraco GitHub bot 🤖 🙂 |
Hmm I don't know how DTGE works, but it does sound like an Umbraco regression, maybe @skttl could help uncover the issue 🙈 |
DTGE saves a temporary Content Template of all grid editors, so the editor must have permissions to create those. |
And it seems that users with Content Start Nodes set other than root are unable to create Content Templates anymore. EDIT: Did some more digging: |
Aha! I think I see the issue then, there is definitely something going wrong here, and I can certainly reproduce it.. 😿 |
@bergmania @Zeegaan I see this issue has been marked as closed, but I still get the Unauthorized access to URL when calling the PostSaveBlueprint endpoint from a solution running on version 10.8.3. Is the user not supposed to have access to this if the usergroup has checkmark in Create Content Template? |
To call PostSaveBlueprint it is required you have access to settings. |
Just to be clear on this specific issue then @bergmania @skttl, in the instance of DTGE I assume this fix won't solve our problem given it seems to use the PostSaveBlueprint endpoint? (Not a problem of course as I appreciate that's deprecated and NOT umbraco but just so I can manage expectations) |
For the same reason I have not upgraded Umbraco 8 projects yet. DTGE is a frequently used component in our sites. @skttl do you see opportunities to release another version that is compatible with Umbraco 8.18.12? |
If you provide a pull request, I can do a release. |
Hi @skttl Is the PostSaveBlueprint only called to trigger a validation? In that case we could replace the submit function in Our.Umbraco.DocTypeGridEditor.Dialogs.DocTypeGridEditorDialog controller from
To
|
Yes, but then you won't have validation. |
That is indeed the reason why PostSaveBlueprint is used, especially for nested content. I looked into making my own controller that could only do validation of a content item, but this turned out to be anything but simple. All validation in Umbraco is in private classes and is therefore not easy to implement |
I see. We are talking about the serverside validation and not the form validation ofcause. |
I made a copy of the ContentController and called it DocTypeGridEditorContentController and then copied all of the required internal references and removed all unnessary code that is not being used by the PostSaveBlueprint and DeleteBlueprint in the ContentController. Then i removed the [Authorize(Policy = AuthorizationPolicies.TreeAccessDocuments)] and replaced it with [Authorize(Policy = AuthorizationPolicies.SectionAccessForContentTree)], so all users who have access to the Content can use it. This works with 10.8.3. But leaves an unsafe route to call a SaveBlueprint , when you are logged in and not having access to the Settings section. It seems like all the validation is made before and after the SaveBlueprint call. |
As far as i know it's only used for validation and the save-part is not necessary. I tried the same for Umbraco 8, but it requires a lot of copying of existing classes. Personally, I don't think that is a nice solution. |
I totally agree that it's not a nice solution and not something i think DTGE should implement. I think that the best solution would be for Umbraco CMS to add a public BlueprintValidation method that DTGE could use. |
That would indeed be a nice solution, which also only needs to consist of less than 10 lines of code. I have created a feature request #15560 |
@si25 a fix might be coming for DTGE: #15572 (comment) |
Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)
8.18.11
Bug summary
On an existing v8 site using DocTypeGridEditor, users cannot submit a module / doctype in a grid editor.
When an attempt is made to do so the following error is displayed
This occurs on ANY user account that has start nodes configures and appears to be to do with access to Content Templates. If content start nodes are removed the issue is resolved.
Specifics
Umbraco v8.18.11
DocTypeGridEditor installed and a module configured
A user is configured to have custom start nodes
Steps to reproduce
Expected result / actual result
User should be able to submit content without issue
@skttl - I'm fully aware DTGE has long since been retired and I appreciate this bug may be more associated with that package directly (and therefore likely won't get fixed) but I felt it necessary to flag this given the error pertains to permissions for Content Blueprints as it may uncover an unintended bug with the patch itself given it only appeared since upgrading 🙏
The text was updated successfully, but these errors were encountered: