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
Maxime Bombar
Note Kfet 2015 django
Commits
4cd63648
Commit
4cd63648
authored
Jan 12, 2018
by
Gabriel Boudy
Browse files
les supreme sont en haut de liste_droit
parent
26ed544e
Changes
1
Hide whitespace changes
Inline
Side-by-side
note/views.py
View file @
4cd63648
...
...
@@ -2182,7 +2182,9 @@ def liste_droits(request, sock, kwargs):
droits
=
set
(
profil
[
"droits"
].
split
(
', '
)
+
profil
[
"droitsurdroits"
].
split
(
', '
)
+
profil
[
"surdroits"
].
split
(
', '
))
supreme
,
nodroitsurd
=
0.5
*
profil
[
"supreme"
],
0.5
*
(
profil
[
"droitsurdroits"
]
==
""
)
+
0.25
*
(
profil
[
"surdroits"
]
==
""
)
if
'all'
in
droits
:
if
supreme
:
return
nodroitsurd
elif
'all'
in
droits
:
return
1.5
-
supreme
elif
droits
&
set
([
'comptes'
,
'search'
,
'adherents_weak'
,
'full_search'
]):
return
2
+
nodroitsurd
...
...
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