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

Allow a Blog Post to be created inside a subfolder of a Blog #55

Merged
merged 1 commit into from
Feb 1, 2024

Conversation

ericof
Copy link
Member

@ericof ericof commented Feb 1, 2024

Closes #54

@ericof ericof self-assigned this Feb 1, 2024
Copy link
Contributor

@jnptk jnptk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ericof ericof merged commit 2a534ea into main Feb 1, 2024
5 checks passed
@ericof ericof deleted the issue-54-blog-subfolders branch February 1, 2024 14:43
Copy link
Member

@davisagli davisagli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ericof @jonaspiterek Thank you. Could I have a new release with this included, please?

>
<genericsetup:upgradeDepends
title="Blog type: Disallow creation outsite a Blog Folder"
import_steps="rolemap"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ericof @jonaspiterek FYI, when I ran this upgrade step on DLR staging, it wiped out the customization that we did to the "Add Blog" permission roles for DLR. I'll take care of it but we need to be more careful with upgrades to the rolemap, and only make the specific change that is needed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@davisagli Interesting point, in this case we needed to reset the permissions for existing installations (otherwise a Blog Post could be added anywhere)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ericof Yes I see, it couldn't be avoided in this case.

blog_path = "/".join(blog.getPhysicalPath())
for permission_id, roles in PERMISSIONS_BLOG:
blog.manage_permission(permission_id, roles=roles, acquire=False)
_log_permission_change(blog_path, permission_id, roles)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no upgrade step to set the "Add Post" permission for existing blogs. So, I'll need to add one for DLR...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@davisagli I missed this one... So obvious.

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.

Not possible to put blog posts into a substructure
3 participants