[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/Security - IPermissionGroup.py:1.1.2.1 IPermissionGroupService.py:1.1.2.1 IPermissionService.py:1.1.2.2
Casey Duncan
casey_duncan@yahoo.com
Sat, 2 Feb 2002 17:02:29 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/Security
In directory cvs.zope.org:/tmp/cvs-serv13749
Modified Files:
Tag: Zope-3x-branch
IPermissionService.py
Added Files:
Tag: Zope-3x-branch
IPermissionGroup.py IPermissionGroupService.py
Log Message:
Added prelim interfaces for security permission group service
=== Added File Zope3/lib/python/Zope/App/Security/IPermissionGroup.py ===
# IRolePermissionGroup.py
#
# Copyright (c) 2001 Zope Coporation and Contributors. All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 1.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
""" Permission Group Object Interface """
from Zope.App.Security.IRegisteredObject import IRegisteredObject
class IPermissionGroup(IRegisteredObject):
""" A class for grouping permissions for managment """
def getPermissions():
""" Return a sequence of IPermissions in this group """
=== Added File Zope3/lib/python/Zope/App/Security/IPermissionGroupService.py ===
# IPermissionGroupService.py
#
# Copyright (c) 2001 Zope Coporation and Contributors. All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 1.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
"""Permission grouping service for security managment"""
from Interface import Interface
class IPermissionGroupService(Interface):
"""Permission grouping service used to organize permissions in security
managment
"""
def getGroupsForPermission(permission):
"""Return a seq of IPermissionGroup objects that contain the
specified permission, which must be an IPermission.
An empty seq is returned if there are no groups containing that
permission.
"""
def getGroups():
"""Return a seq of all IPermissionGroups, or an empty seq if there are
none"""
def getGroup(gid):
"""Return the IPermissionGroup with the id gid. Raise NotFoundError
if no such group exists"""
=== Zope3/lib/python/Zope/App/Security/IPermissionService.py 1.1.2.1 => 1.1.2.2 ===
+# IPermissionService.py
#
# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
#