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

Plip10359 security controlpanel #24

Merged
merged 5 commits into from Feb 27, 2015
Merged

Conversation

jcerjak
Copy link
Member

@jcerjak jcerjak commented Jan 27, 2015

Read security settings from the registry instead of portal properties. This is part of work on the security control panel migration: plone/Products.CMFPlone#216

This should be merged along with plone/Products.CMFPlone#362

pprop = getToolByName(self.portal, 'portal_properties')
self.portal.manage_addProperty('validate_email', False, 'boolean')
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

@jcerjak Don't we have to check if that property already exist? I would expect this to fail if we would run it in Plone 4.x.

Copy link
Member Author

Choose a reason for hiding this comment

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

you're right, I'll fix it

@jcerjak
Copy link
Member Author

jcerjak commented Feb 27, 2015

Plone 4 compatibility restored.

pprop = getToolByName(self.portal, 'portal_properties')
try:
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

try/except without a specific error are usually a bad idea because they will swallow any exception that might occur.

tisto added a commit that referenced this pull request Feb 27, 2015
@tisto tisto merged commit e8a4459 into master Feb 27, 2015
@tisto tisto deleted the plip10359-security-controlpanel branch February 27, 2015 16:38
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

Successfully merging this pull request may close these issues.

None yet

2 participants