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
abf30b1c
Commit
abf30b1c
authored
Sep 28, 1999
by
Michel Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more missing stuff that only rears it's head when you specify a search
parent
e705f174
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
0 deletions
+50
-0
lib/python/Products/ZCatalog/ZCatalog.py
lib/python/Products/ZCatalog/ZCatalog.py
+50
-0
No files found.
lib/python/Products/ZCatalog/ZCatalog.py
View file @
abf30b1c
...
...
@@ -566,3 +566,53 @@ def p_name(name):
def
absattr
(
attr
):
if
callable
(
attr
):
return
attr
()
return
attr
class
td
(
TemplateDict
,
cDocument
):
pass
def
expr_match
(
ob
,
ed
,
c
=
InstanceDict
,
r
=
0
):
e
,
md
,
push
,
pop
=
ed
push
(
c
(
ob
,
md
))
try
:
r
=
e
.
eval
(
md
)
finally
:
pop
()
return
r
def
mtime_match
(
ob
,
t
,
q
,
fn
=
hasattr
):
if
not
fn
(
ob
,
'_p_mtime'
):
return
0
return
q
==
'<'
and
(
ob
.
_p_mtime
<
t
)
or
(
ob
.
_p_mtime
>
t
)
def
role_match
(
ob
,
permission
,
roles
,
lt
=
type
([]),
tt
=
type
(())):
pr
=
[]
fn
=
pr
.
append
while
1
:
if
hasattr
(
ob
,
permission
):
p
=
getattr
(
ob
,
permission
)
if
type
(
p
)
is
lt
:
map
(
fn
,
p
)
if
hasattr
(
ob
,
'aq_parent'
):
ob
=
ob
.
aq_parent
continue
break
if
type
(
p
)
is
tt
:
map
(
fn
,
p
)
break
if
p
is
None
:
map
(
fn
,
(
'Manager'
,
'Anonymous'
))
break
if
hasattr
(
ob
,
'aq_parent'
):
ob
=
ob
.
aq_parent
continue
break
for
role
in
roles
:
if
not
(
role
in
pr
):
return
0
return
1
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