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

Prevent unauthorised modules from being moved #48

Open
tan3ot opened this issue Jul 1, 2024 · 5 comments
Open

Prevent unauthorised modules from being moved #48

tan3ot opened this issue Jul 1, 2024 · 5 comments

Comments

@tan3ot
Copy link

tan3ot commented Jul 1, 2024

Thanks for the added feature which enables moving modules!

In some pages of my project there are only certain modules allowed which is realised by e.g. "create: module.text".
Nevertheless, you can also move other modules into it.

Can you reproduce this behaviour?

@medienbaecker
Copy link
Owner

Wether moving is allowed depends on the pages sections of the destination page. All I did was adding a pages section with all of the module templates.

In other words: it doesn't matter what you do in the parent page.

@tan3ot
Copy link
Author

tan3ot commented Jul 1, 2024

Ok, so every module can be moved in every modules folder...
Is it planned that the behaviour of the "move"-Function is like in normal pages – depending on what's allowed?
If not – it's ok for it's not important – only nice-to-have...

@medienbaecker
Copy link
Owner

Yeah, unfortunately it's not so easy. The actual parent of the modules is the modules container while your settings are one level up. What happens if you have two modules sections in the parent page with different create settings? What about template and templatesIgnore?

For now I can't seem to find an easy solution.

@tan3ot
Copy link
Author

tan3ot commented Jul 1, 2024

Are two or more modules sections on one page possible? I did a test and it doesn't seem to work...

btw: templatesIgnore: modules
is always important for pages sections in pages with Modules...

But yes: Obviously it's not trivial, as it also took longer for pages to implement this...

@medienbaecker
Copy link
Owner

It works if you set a different parent, so a separate modules container.

btw: templatesIgnore: modules
is always important for pages sections in pages with Modules...

Absolutely. I normally define what kind of templates are allowed anyway to not have any bad surprises.

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

No branches or pull requests

2 participants