-
-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move check for 'Reply to item' permission from Products.CMFPlone here.
- Loading branch information
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"]) | ||
) |