[Zope] Re: [Zope-dev] Assigning Permissions To Roles

Chris McDonough chrism@digicool.com
Thu, 21 Sep 2000 15:20:46 -0400


try:

  self.manage_role('myRole', ['View management screens', 'View'])

You may also want to check out this document:

http://www.zope.org/Members/mcdonc/PDG/6-1-Security.stx


----- Original Message ----- 
From: <khowe@performance-net.com>
To: <zope-dev@zope.org>; <zope@zope.org>
Sent: Thursday, September 21, 2000 3:01 PM
Subject: [Zope-dev] Assigning Permissions To Roles


I am having trouble getting Roles to work via my Python Product.

Creating a local role works fine:
 
  self._addRole('myRole')
    
But how do I tell the Role what permissions it has programmatically?

After looking in Role.py, I tried the following:

  self.manage_role('myRole', ['View management screens, View'])

but this kicks up an error. Am I calling this impoperly?

kh


_______________________________________________
Zope-Dev maillist  -  Zope-Dev@zope.org
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )