#NEWLINE# def __str__( self ) : #NEWLINE# #INDENT# if self . folder : #NEWLINE# #INDENT# name = ( '%s' % self . folder ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# name = 'All Folders' #NEWLINE# #UNINDENT# ug = [ ] #NEWLINE# if self . everybody : #NEWLINE# #INDENT# ug . append ( 'Everybody' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if self . group : #NEWLINE# #INDENT# ug . append ( ( 'Group: %s' % self . group ) ) #NEWLINE# #UNINDENT# if self . user : #NEWLINE# #INDENT# ug . append ( ( 'User: %s' % self . user ) ) #NEWLINE# #UNINDENT# #UNINDENT# usergroup = ' ' . join ( ug ) #NEWLINE# perms = [ ] #NEWLINE# for s in [ 'can_edit' , 'can_read' , 'can_add_children' ] : #NEWLINE# #INDENT# perm = getattr ( self , s ) #NEWLINE# if ( perm == self . ALLOW ) : #NEWLINE# #INDENT# perms . append ( s ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( perm == self . DENY ) : #NEWLINE# #INDENT# perms . append ( ( '!%s' % s ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# perms = ', ' . join ( perms ) #NEWLINE# return ( "Folder: '%s'->%s [%s] [%s]" % ( name , self . get_type_display ( ) , perms , usergroup ) )