Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Nounous
re2o
Commits
7938c64a
Commit
7938c64a
authored
Aug 11, 2018
by
Charlie Jacomme
Committed by
chirac
Aug 12, 2018
Browse files
bug fix acl -> this system is not understanble, and is buggy
parent
b24ef60d
Changes
1
Hide whitespace changes
Inline
Side-by-side
re2o/templatetags/acl.py
View file @
7938c64a
...
...
@@ -146,7 +146,7 @@ def get_callback(tag_name, obj=None):
if
tag_name
==
'can_view_app'
:
return
acl_fct
(
lambda
x
:
(
not
any
(
not
sys
.
modules
[
o
].
can_view
(
x
)
for
o
in
obj
),
not
any
(
not
sys
.
modules
[
o
].
can_view
(
x
)
[
0
]
for
o
in
obj
),
None
),
False
...
...
@@ -154,7 +154,7 @@ def get_callback(tag_name, obj=None):
if
tag_name
==
'cannot_view_app'
:
return
acl_fct
(
lambda
x
:
(
not
any
(
not
sys
.
modules
[
o
].
can_view
(
x
)
for
o
in
obj
),
not
any
(
not
sys
.
modules
[
o
].
can_view
(
x
)
[
0
]
for
o
in
obj
),
None
),
True
...
...
@@ -171,12 +171,12 @@ def get_callback(tag_name, obj=None):
)
if
tag_name
==
'can_view_any_app'
:
return
acl_fct
(
lambda
x
:
(
any
(
sys
.
modules
[
o
].
can_view
(
x
)
for
o
in
obj
),
None
),
lambda
x
:
(
any
(
sys
.
modules
[
o
].
can_view
(
x
)
[
0
]
for
o
in
obj
),
None
),
False
)
if
tag_name
==
'cannot_view_any_app'
:
return
acl_fct
(
lambda
x
:
(
any
(
sys
.
modules
[
o
].
can_view
(
x
)
for
o
in
obj
),
None
),
lambda
x
:
(
any
(
sys
.
modules
[
o
].
can_view
(
x
)
[
0
]
for
o
in
obj
),
None
),
True
)
...
...
Write
Preview
Supports
Markdown
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