Skip to content

Commit

Permalink
Use new-style security declarations everywhere possible. This means
Browse files Browse the repository at this point in the history
remove the use of __ac_permissions__, foo__roles__ and
default__class_init__. A few corner cases can't be converted because of
circular imports.
  • Loading branch information
Florent Guillaume committed Nov 21, 2005
1 parent 295a034 commit f6b17dd
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions SQL.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@

import Shared.DC.ZRDB.DA
from Globals import DTMLFile
from Globals import InitializeClass
from AccessControl import ClassSecurityInfo
from AccessControl.Permissions import change_database_methods
from webdav.WriteLockInterface import WriteLockInterface

def SQLConnectionIDs(self):
Expand Down Expand Up @@ -120,12 +123,11 @@ class SQL(Shared.DC.ZRDB.DA.DA):
__implements__ = (WriteLockInterface,)
meta_type='Z SQL Method'

security = ClassSecurityInfo()

security.declareProtected(change_database_methods, 'manage')
security.declareProtected(change_database_methods, 'manage_main')
manage=manage_main=DTMLFile('dtml/edit', globals())
manage_main._setName('manage_main')

__ac_permissions__=(
('Change Database Methods', ('manage', 'manage_main')),
)

import Globals
Globals.InitializeClass(SQL)
InitializeClass(SQL)

0 comments on commit f6b17dd

Please sign in to comment.