Skip to content

Commit

Permalink
Hide uninstall profile
Browse files Browse the repository at this point in the history
  • Loading branch information
hvelarde committed Jun 9, 2017
1 parent 44da670 commit 6dd187d
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Changelog
1.0b2 (unreleased)
^^^^^^^^^^^^^^^^^^

- Hide uninstall profile.
[hvelarde]

- Use `plone.app.vocabularies.ImagesScales` vocabulary (closes `#17`_).
[rodfersou]

Expand Down
8 changes: 6 additions & 2 deletions src/sc/periodicals/profiles.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,17 @@
title="sc.periodicals"
description="A content type to register periodicals of a publication."
directory="profiles/default"
provides="Products.GenericSetup.interfaces.EXTENSION" />
provides="Products.GenericSetup.interfaces.EXTENSION"
/>

<genericsetup:registerProfile
name="uninstall"
title="sc.periodicals uninstall"
directory="profiles/uninstall"
description="Uninstall profile for the sc.periodicals package."
provides="Products.GenericSetup.interfaces.EXTENSION" />
provides="Products.GenericSetup.interfaces.EXTENSION"
/>

<utility factory=".setuphandlers.HiddenProfiles" name="sc.periodicals" />

</configure>
13 changes: 13 additions & 0 deletions src/sc/periodicals/setuphandlers.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# -*- coding: utf-8 -*-
from Products.CMFPlone.interfaces import INonInstallable
from zope.interface import implementer


@implementer(INonInstallable)
class HiddenProfiles(object): # pragma: no cover

def getNonInstallableProfiles(self):
"""Do not show on Plone's list of installable profiles."""
return [
u'sc.periodicals:uninstall',
]

0 comments on commit 6dd187d

Please sign in to comment.