Closed lferran closed 4 years ago
@vangheem done the requested changes :+1:
Merging #800 into master will increase coverage by
0.1%
. The diff coverage is100%
.
@@ Coverage Diff @@
## master #800 +/- ##
========================================
+ Coverage 94.3% 94.3% +0.1%
========================================
Files 309 312 +3
Lines 28192 28299 +107
========================================
+ Hits 26575 26685 +110
+ Misses 1617 1614 -3
Impacted Files | Coverage Δ | |
---|---|---|
guillotina/configure/__init__.py | 90.1% <ø> (ø) |
:arrow_up: |
guillotina/contrib/dbusers/content/users.py | 96.8% <ø> (ø) |
:arrow_up: |
guillotina/tests/test_transactions.py | 100% <ø> (ø) |
:arrow_up: |
guillotina/contrib/dbusers/content/groups.py | 86.5% <ø> (ø) |
:arrow_up: |
guillotina/api/content.py | 90.9% <100%> (ø) |
:arrow_up: |
guillotina/tests/dbusers/test_manage_groups.py | 100% <100%> (ø) |
:arrow_up: |
guillotina/tests/test_content.py | 100% <100%> (ø) |
:arrow_up: |
guillotina/tests/dbusers/test_manage_users.py | 100% <100%> (ø) |
:arrow_up: |
guillotina/content.py | 92.8% <100%> (+0.1%) |
:arrow_up: |
guillotina/tests/dbusers/test_api.py | 100% <100%> (ø) |
:arrow_up: |
... and 18 more |
Hey, tha't super cool, but it solves the issue https://github.com/plone/guillotina/issues/778 or this https://github.com/plone/guillotina/issues/771.
May I close them?
What should I do to restrict some types to only some folders?
@jordic you have to define that content as @configure.contenttype("MyType", ..., globally_addable=False)
but then allow it on those folders @configure.contenttype("MyFolder", ..., allowed_types=["MyType"])
Then we could close both issues :)
So sorry, I'm not pretty sure what's on, just discovered the Interface IConstrainTYpes.. perhaps it's as easy of implementing this? There is also the conf setting of 'cobtainer_types'. @vangheem?