Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
intranet
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Leo Colisson
intranet
Commits
ffddf934
Commit
ffddf934
authored
Feb 04, 2015
by
Pierre-Elliott Bécue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
On permet les logins des clubs pour les factures.
Et on filtre les applications qui ne marchent pas pour les clubs.
parent
ba5e674c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
11 deletions
+11
-11
apps/factures/views.py
apps/factures/views.py
+2
-2
login.py
login.py
+1
-1
settings.py
settings.py
+8
-8
No files found.
apps/factures/views.py
View file @
ffddf934
...
...
@@ -35,7 +35,7 @@ def facture(request, fid):
else
:
f
=
f
[
0
]
if
not
f
.
dn
.
split
(
','
)[
1
]
==
'aid=%s'
%
luser
[
'aid'
][
0
]:
if
not
f
.
dn
in
[
fac
.
dn
for
fac
in
luser
.
factures
()
]:
return
redirect
(
'factures:index'
)
total
=
0
for
i
in
range
(
0
,
len
(
f
[
'article'
])):
...
...
@@ -47,6 +47,6 @@ def facture(request, fid):
paid
=
0
date
=
f
[
'historique'
][
0
].
value
.
split
(
','
)[
0
]
topay
=
total
-
paid
topay
=
total
-
paid
# return render(request, 'factures/facture.tex', {'total':total, 'paid':paid, 'topay':total-paid, 'date':f['historique'][0].value.split(',')[0], 'f':f})
return
render_tex
(
request
,
'factures/facture.tex'
,
{
'total'
:
total
,
'paid'
:
paid
,
'topay'
:
topay
,
'DATE'
:
date
,
'f'
:
f
})
login.py
View file @
ffddf934
...
...
@@ -65,7 +65,7 @@ def refresh_fields(user, cl_user):
user
.
first_name
=
unicode
(
cl_user
.
get
(
'prenom'
,
[
u
"club"
])[
0
])
user
.
last_name
=
unicode
(
cl_user
[
'nom'
][
0
])
mail
=
unicode
(
cl_user
[
'mail'
]
[
0
])
mail
=
unicode
(
cl_user
.
get
(
'mail'
,
cl_user
[
'uid'
])
[
0
])
if
'@'
not
in
mail
:
# Ne devrait pas arriver (pour migration)
mail
+=
u
'@crans.org'
user
.
email
=
mail
...
...
settings.py
View file @
ffddf934
...
...
@@ -30,7 +30,7 @@ except ImportError:
# - "o2" : on est en prod sur o2
# - "vo" : on est en test sur vo
# - "localhome" : on est en dev dans son localhome perso (penser à changer le ROOT_PATH)
# Est-ce qu'on doit servir les fichiers statiques
DEV
=
False
...
...
@@ -46,13 +46,13 @@ except ImportError:
# Utiliser la base LDAP de test ?
BASE_LDAP_TEST
=
False
# L'url de l'intranet
ROOT_URL
=
"https://intranet2.crans.org/"
# À qui faut-il envoyer les mails de câblage
CABLAGE_MAIL_DEST
=
[
'respbats@crans.org'
,
]
# Faut-il utiliser le CAS pour s'authentifier
CAS_ENABLED
=
True
...
...
@@ -237,7 +237,7 @@ INTRANET_APPS = (
'name'
:
APP_PRISES_NAME
,
'category'
:
'Administration'
,
'label'
:
u
'Prises réseau'
,
'test'
:
(
lambda
u
:
u
.
has_perm
(
'prises.can_view'
)
or
u
.
groups
.
filter
(
name
=
'crans_paiement_ok'
)),
'test'
:
(
lambda
u
:
(
u
.
has_perm
(
'prises.can_view'
)
or
u
.
groups
.
filter
(
name
=
'crans_paiement_ok'
))
and
'cid'
not
in
conn_pool
.
get_user
(
u
)),
},
{
'name'
:
'impressions'
,
...
...
@@ -269,7 +269,7 @@ INTRANET_APPS = (
'title'
:
'Service de téléphonie via internet'
,
'category'
:
'Services'
,
'label'
:
u
'Téléphonie VoIP'
,
'test'
:
(
lambda
u
:
not
u
.
groups
.
filter
(
name
=
'crous'
))
'test'
:
(
lambda
u
:
not
u
.
groups
.
filter
(
name
=
'crous'
)
and
'cid'
not
in
conn_pool
.
get_user
(
u
)
)
},
{
'name'
:
'wiki'
,
...
...
@@ -281,13 +281,13 @@ INTRANET_APPS = (
'name'
:
'machines'
,
'category'
:
'Administration'
,
'label'
:
'Gestion des machines'
,
'test'
:
lambda
u
:
u
.
groups
.
filter
(
name
=
'crans_paiement_ok'
)
or
conn_pool
.
get_user
(
u
).
machines
()
!=
[]
,
'test'
:
lambda
u
:
(
u
.
groups
.
filter
(
name
=
'crans_paiement_ok'
)
or
conn_pool
.
get_user
(
u
).
machines
()
!=
[])
and
'cid'
not
in
conn_pool
.
get_user
(
u
)
,
},
{
'name'
:
'factures'
,
'category'
:
'Administration'
,
'label'
:
'Mes factures'
,
'test'
:
lambda
u
:
u
.
groups
.
filter
(
name
=
'crans_
nounou'
)
,
'test'
:
lambda
u
:
u
.
groups
.
filter
(
name
=
'crans_
paiement_ok'
)
or
conn_pool
.
get_user
(
u
).
factures
()
!=
[]
,
},
{
'name'
:
'validation'
,
...
...
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