[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/OFS/Services/RoleService - Role.py:1.4 configure.zcml:1.6
Jim Fulton
jim@zope.com
Sun, 23 Jun 2002 13:04:13 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/Services/RoleService
In directory cvs.zope.org:/tmp/cvs-serv11667/lib/python/Zope/App/OFS/Services/RoleService
Modified Files:
Role.py configure.zcml
Log Message:
Finished implementing
http://dev.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/AddMenuProposalAndEndOfZmiNamespace
Updated the service manager to use a menu.
Ripped out the old adder registry code.
=== Zope3/lib/python/Zope/App/OFS/Services/RoleService/Role.py 1.3 => 1.4 ===
from Zope.App.Security.IRole import IRole
-from Zope.ComponentArchitecture.IFactory import IFactory
-from Zope.App.Security.Registries.RegisteredObject import RegisteredObject
+from Zope.App.Security.Registries.RoleRegistry import Role
from Persistence import Persistent
-class Role(RegisteredObject, Persistent):
- __implements__ = IRole
- __class_implements__ = IFactory
-
- def __init__(self):
- super(Role, self).__init__('', '', '')
-
- def setId(self, id):
- self._id = id
-
- def getInterfaces(self):
- return self.__implements__
+class Role(Role, Persistent):
+ "Persistent Role"
=== Zope3/lib/python/Zope/App/OFS/Services/RoleService/configure.zcml 1.5 => 1.6 ===
>
<content class=".RoleService.">
+
<factory
id="RoleService"
permission="Zope.ManageServices"
- title="Roles" />
+ />
+
<require
permission="Zope.Security"
interface="Zope.App.Security.IRoleService." />
<require
permission="Zope.ManageServices"
interface="Zope.App.OFS.Container.IContainer." />
+
</content>
+
+ <browser:menuItem menu="add_service" for="Zope.App.OFS.Container.IAdding."
+ action="RoleService" title="Role Service" />
<content class=".Role.">
+ <factory />
<require
permission="Zope.Security"
interface="Zope.App.Security.IRole." />
</content>
-
- <factory component=".Role." />
<include package=".Views" />