Skip to content

Commit

Permalink
move check for 'Reply to item' permission from Products.CMFPlone here.
Browse files Browse the repository at this point in the history
  • Loading branch information
jensens committed Jul 14, 2023
1 parent 016f1f8 commit 15e6d42
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions plone/app/discussion/tests/test_permissions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from ..testing import PLONE_APP_DISCUSSION_INTEGRATION_TESTING
from AccessControl.PermissionRole import rolesForPermissionOn

import unittest


class PermissionsTest(unittest.TestCase):
"""Make sure the permissions are set up properly."""

layer = PLONE_APP_DISCUSSION_INTEGRATION_TESTING

def test_permissions_site_administrator_role(self):
# This integration test shows that the correct permissions were
# assigned to the Site Administrator role (whether inherited from the
# Zope application, or specified in the portal rolemap).
self.assertTrue(
"Site Administrator"
not in rolesForPermissionOn("Reply to item", self.layer["portal"])
)

0 comments on commit 15e6d42

Please sign in to comment.