• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 16. Securing Components > Step 4: Assigning Roles to Principals

Step 4: Assigning Roles to Principals

To make the messageboard package work again, you now have to connect the roles to some principals. You are going to create two new principals called boarduser and boardeditor. To do that, you go to the Zope 3 instance etc/ directory and add the following lines to principals.zcml:

01 <principal 
02     id="book.messageboard.boarduser" 
03     title="Message Board User"
04     login="boarduser" password="book"
05     />
06 <grant 
07     role="book.messageboard.User" 
08     principal="book.messageboard.boarduser"
09     />
10 
11 <principal 
12     id="book.messageboard.boardeditor" 
13     title="Message Board Editor"
14     login="boardeditor" password="book"
15     />
16 <grant 
17     role="book.messageboard.User" 
18     principal="book.messageboard.boardeditor"
19     />
20 <grant 
21     role="book.messageboard.Editor" 
22     principal="book.messageboard.boardeditor"
23     />


					  


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint