Skip to content

Commit

Permalink
Hide unistall profile
Browse files Browse the repository at this point in the history
  • Loading branch information
hvelarde committed Aug 25, 2015
1 parent 7e6e4c1 commit af0203b
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/sc/embedder/profiles.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
i18n:attributes="title; description"
/>

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

<include package=".upgrades" />

</configure>
24 changes: 24 additions & 0 deletions src/sc/embedder/setuphandlers.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,31 @@
# -*- coding: utf-8 -*-
from plone import api
from Products.CMFPlone import interfaces as Plone
from Products.CMFQuickInstallerTool import interfaces as QuickInstaller
from Products.PortalTransforms.Transform import make_config_persistent
from sc.embedder.logger import logger
from zope.interface import implements


class HiddenProfiles(object):

implements(Plone.INonInstallable)

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


class HiddenProducts(object):

implements(QuickInstaller.INonInstallable)

def getNonInstallableProducts(self):
"""Do not show on QuickInstaller's list of installable products."""
return [
]


def setup_portal_transforms(context):
Expand Down

0 comments on commit af0203b

Please sign in to comment.