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
00a8a471
Commit
00a8a471
authored
Mar 30, 1999
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed to support new Python product registry mechanism
parent
33da7cd9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
7 deletions
+12
-7
lib/python/AccessControl/User.py
lib/python/AccessControl/User.py
+1
-2
lib/python/Globals.py
lib/python/Globals.py
+11
-5
No files found.
lib/python/AccessControl/User.py
View file @
00a8a471
...
@@ -84,7 +84,7 @@
...
@@ -84,7 +84,7 @@
##############################################################################
##############################################################################
"""Access control package"""
"""Access control package"""
__version__
=
'$Revision: 1.7
0
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.7
1
$'
[
11
:
-
2
]
import
Globals
,
App
.
Undo
,
socket
,
regex
import
Globals
,
App
.
Undo
,
socket
,
regex
from
Globals
import
HTMLFile
,
MessageDialog
,
Persistent
,
PersistentMapping
from
Globals
import
HTMLFile
,
MessageDialog
,
Persistent
,
PersistentMapping
...
@@ -290,7 +290,6 @@ class BasicUserFolder(Implicit, Persistent, Navigation, Tabs, RoleManager,
...
@@ -290,7 +290,6 @@ class BasicUserFolder(Implicit, Persistent, Navigation, Tabs, RoleManager,
meta_type
=
'User Folder'
meta_type
=
'User Folder'
id
=
'acl_users'
id
=
'acl_users'
title
=
'User Folder'
title
=
'User Folder'
icon
=
'p_/UserFolder'
isPrincipiaFolderish
=
1
isPrincipiaFolderish
=
1
isAUserFolder
=
1
isAUserFolder
=
1
...
...
lib/python/Globals.py
View file @
00a8a471
...
@@ -85,7 +85,7 @@
...
@@ -85,7 +85,7 @@
"""Global definitions"""
"""Global definitions"""
__version__
=
'$Revision: 1.3
8
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.3
9
$'
[
11
:
-
2
]
import
sys
,
os
import
sys
,
os
from
DateTime
import
DateTime
from
DateTime
import
DateTime
...
@@ -96,11 +96,13 @@ DevelopmentMode=None
...
@@ -96,11 +96,13 @@ DevelopmentMode=None
def
package_home
(
globals_dict
):
def
package_home
(
globals_dict
):
__name__
=
globals_dict
[
'__name__'
]
__name__
=
globals_dict
[
'__name__'
]
m
=
sys
.
modules
[
__name__
]
m
=
sys
.
modules
[
__name__
]
if
hasattr
(
m
,
'__path__'
):
return
m
.
__path__
[
0
]
if
hasattr
(
m
,
'__path__'
):
if
"."
in
__name__
:
r
=
m
.
__path__
[
0
]
return
sys
.
modules
[
__name__
[:
rfind
(
__name__
,
'.'
)]].
__path__
[
0
]
elif
"."
in
__name__
:
r
=
sys
.
modules
[
__name__
[:
rfind
(
__name__
,
'.'
)]].
__path__
[
0
]
else
:
else
:
return
__name__
r
=
__name__
return
os
.
path
.
join
(
os
.
getcwd
(),
r
)
try
:
home
=
os
.
environ
[
'SOFTWARE_HOME'
]
try
:
home
=
os
.
environ
[
'SOFTWARE_HOME'
]
except
:
except
:
...
@@ -219,10 +221,12 @@ class HTMLFile(DocumentTemplate.HTMLFile,MethodObject.Method,):
...
@@ -219,10 +221,12 @@ class HTMLFile(DocumentTemplate.HTMLFile,MethodObject.Method,):
elif
type
(
_prefix
)
is
not
type
(
''
):
_prefix
=
package_home
(
_prefix
)
elif
type
(
_prefix
)
is
not
type
(
''
):
_prefix
=
package_home
(
_prefix
)
args
=
(
self
,
'%s/%s.dtml'
%
(
_prefix
,
name
))
args
=
(
self
,
'%s/%s.dtml'
%
(
_prefix
,
name
))
if
not
kw
.
has_key
(
'__name__'
):
kw
[
'__name__'
]
=
name
apply
(
HTMLFile
.
inheritedAttribute
(
'__init__'
),
args
,
kw
)
apply
(
HTMLFile
.
inheritedAttribute
(
'__init__'
),
args
,
kw
)
def
__call__
(
self
,
*
args
,
**
kw
):
def
__call__
(
self
,
*
args
,
**
kw
):
if
DevelopmentMode
:
if
DevelopmentMode
:
__traceback_info__
=
self
.
raw
t
=
os
.
stat
(
self
.
raw
)
t
=
os
.
stat
(
self
.
raw
)
if
t
!=
self
.
_v_last_read
:
if
t
!=
self
.
_v_last_read
:
self
.
cook
()
self
.
cook
()
...
@@ -267,3 +271,5 @@ def getitems(o,names):
...
@@ -267,3 +271,5 @@ def getitems(o,names):
return
r
return
r
def
Dictionary
(
**
kw
):
return
kw
# Sorry Guido
def
Dictionary
(
**
kw
):
return
kw
# Sorry Guido
from
ImageFile
import
ImageFile
# So we can import from here
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