Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
20418f31
Commit
20418f31
authored
Oct 08, 2008
by
Sidnei da Silva
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- More PEP-328 changes. Make imports absolute.
parent
16688f87
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
18 deletions
+19
-18
lib/python/AccessControl/ImplC.py
lib/python/AccessControl/ImplC.py
+6
-5
lib/python/AccessControl/ImplPython.py
lib/python/AccessControl/ImplPython.py
+2
-2
lib/python/AccessControl/__init__.py
lib/python/AccessControl/__init__.py
+10
-10
lib/python/AccessControl/cAccessControl.c
lib/python/AccessControl/cAccessControl.c
+1
-1
No files found.
lib/python/AccessControl/ImplC.py
View file @
20418f31
...
...
@@ -15,18 +15,19 @@
try
:
from
cAccessControl
import
rolesForPermissionOn
,
\
from
AccessControl.
cAccessControl
import
rolesForPermissionOn
,
\
PermissionRole
,
imPermissionRole
,
_what_not_even_god_should_do
,
\
RestrictedDTMLMixin
,
aq_validate
,
guarded_getattr
,
\
setDefaultBehaviors
from
cAccessControl
import
ZopeSecurityPolicy
as
cZopeSecurityPolicy
from
cAccessControl
import
SecurityManager
as
cSecurityManager
from
AccessControl.cAccessControl
import
ZopeSecurityPolicy
\
as
cZopeSecurityPolicy
from
AccessControl.cAccessControl
import
SecurityManager
as
cSecurityManager
except
ImportError
:
import
sys
# make sure a partial import doesn't pollute sys.modules
del
sys
.
modules
[
__name__
]
raise
from
AccessControl.ImplPython
import
RestrictedDTML
from
AccessControl.ImplPython
import
SecurityManager
,
ZopeSecurityPolicy
...
...
lib/python/AccessControl/ImplPython.py
View file @
20418f31
...
...
@@ -30,7 +30,7 @@ try:
except
ImportError
:
_what_not_even_god_should_do
=
[]
from
AccessControl
import
SecurityManagement
from
AccessControl
.SecurityManagement
import
getSecurityManager
from
AccessControl
import
Unauthorized
from
AccessControl.interfaces
import
ISecurityPolicy
from
AccessControl.interfaces
import
ISecurityManager
...
...
@@ -721,7 +721,7 @@ def guarded_getattr(inst, name, default=_marker):
# See if we can get the value doing a filtered acquire.
# aq_acquire will either return the same value as held by
# v or it will return an Unauthorized raised by validate.
validate
=
SecurityManagement
.
getSecurityManager
().
validate
validate
=
getSecurityManager
().
validate
aq_acquire
(
inst
,
name
,
aq_validate
,
validate
)
return
v
...
...
lib/python/AccessControl/__init__.py
View file @
20418f31
...
...
@@ -14,18 +14,18 @@
from
unauthorized
import
Unauthorized
# This has to happen early so things get initialized properly
from
Implementation
import
setImplementation
from
AccessControl.
Implementation
import
setImplementation
from
SecurityManagement
import
getSecurityManager
,
setSecurityPolicy
from
SecurityInfo
import
ClassSecurityInfo
,
ModuleSecurityInfo
from
SecurityInfo
import
ACCESS_PRIVATE
from
SecurityInfo
import
ACCESS_PUBLIC
from
SecurityInfo
import
ACCESS_NONE
from
SecurityInfo
import
secureModule
,
allow_module
,
allow_class
from
SimpleObjectPolicies
import
allow_type
from
ZopeGuards
import
full_write_guard
,
safe_builtins
from
AccessControl.
SecurityManagement
import
getSecurityManager
,
setSecurityPolicy
from
AccessControl.
SecurityInfo
import
ClassSecurityInfo
,
ModuleSecurityInfo
from
AccessControl.
SecurityInfo
import
ACCESS_PRIVATE
from
AccessControl.
SecurityInfo
import
ACCESS_PUBLIC
from
AccessControl.
SecurityInfo
import
ACCESS_NONE
from
AccessControl.
SecurityInfo
import
secureModule
,
allow_module
,
allow_class
from
AccessControl.
SimpleObjectPolicies
import
allow_type
from
AccessControl.
ZopeGuards
import
full_write_guard
,
safe_builtins
ModuleSecurityInfo
(
'AccessControl'
).
declarePublic
(
'getSecurityManager'
)
import
DTML
from
AccessControl
import
DTML
del
DTML
lib/python/AccessControl/cAccessControl.c
View file @
20418f31
...
...
@@ -2301,7 +2301,7 @@ void initcAccessControl(void) {
/*| from logger_wrapper import warn
*/
IMPORT
(
module
,
"logger_wrapper"
);
IMPORT
(
module
,
"
AccessControl.
logger_wrapper"
);
GETATTR
(
module
,
warn
);
Py_DECREF
(
module
);
module
=
NULL
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment