Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #120 from plone/use_package_permissions
Use package permissions to protect views instead of more general ones
- Loading branch information
Showing
8 changed files
with
65 additions
and
66 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,2 @@ | ||
Use the package-permissions to protect views and toolbar-actions. | ||
[pbauer] |
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
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
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
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
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 |
---|---|---|
@@ -1,31 +1,2 @@ | ||
################################################################## | ||
# | ||
# (C) Copyright 2006 ObjectRealms, LLC | ||
# All Rights Reserved | ||
# | ||
# This file is part of iterate. | ||
# | ||
# iterate is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation; either version 2 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# iterate is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with CMFDeployment; if not, write to the Free Software | ||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
################################################################## | ||
|
||
from AccessControl.Permission import addPermission | ||
|
||
|
||
CheckinPermission = "iterate : Check in content" | ||
CheckoutPermission = "iterate : Check out content" | ||
|
||
DEFAULT_ROLES = ("Manager", "Owner", "Site Administrator", "Editor") | ||
addPermission(CheckinPermission, default_roles=DEFAULT_ROLES) | ||
addPermission(CheckoutPermission, default_roles=DEFAULT_ROLES) |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<metadata> | ||
<version>1000</version> | ||
<version>1001</version> | ||
</metadata> |
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,21 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<rolemap> | ||
<permissions> | ||
<permission acquire="True" | ||
name="iterate : Check out content" | ||
> | ||
<role name="Manager" /> | ||
<role name="Site Administrator" /> | ||
<role name="Editor" /> | ||
<role name="Owner" /> | ||
</permission> | ||
<permission acquire="True" | ||
name="iterate : Check in content" | ||
> | ||
<role name="Manager" /> | ||
<role name="Site Administrator" /> | ||
<role name="Editor" /> | ||
<role name="Owner" /> | ||
</permission> | ||
</permissions> | ||
</rolemap> |