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
R
re2o
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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nounous
re2o
Commits
f8428568
Commit
f8428568
authored
Dec 29, 2017
by
LEVY-FALK Hugo
Committed by
root
Jan 06, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ACL sur les templates de logs.
parent
077215cd
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
17 deletions
+19
-17
logs/templates/logs/aff_stats_logs.html
logs/templates/logs/aff_stats_logs.html
+4
-3
logs/templates/logs/aff_summary.html
logs/templates/logs/aff_summary.html
+11
-11
logs/templates/logs/sidebar.html
logs/templates/logs/sidebar.html
+3
-2
re2o/templatetags/acl.py
re2o/templatetags/acl.py
+1
-1
No files found.
logs/templates/logs/aff_stats_logs.html
View file @
f8428568
...
...
@@ -27,6 +27,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% endif %}
{% load logs_extra %}
{% load acl %}
<table
class=
"table table-striped"
>
<thead>
...
...
@@ -47,19 +48,19 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<td>
{{ revision.user }}
</td>
<td>
{{ revision.date_created }}
</td>
<td>
{{ revision.comment }}
</td>
{%
if is_bureau
%}
{%
can_edit_history
%}
<td>
<a
class=
"btn btn-danger btn-sm"
role=
"button"
href=
"{% url 'logs:revert-action' revision.id %}"
>
<i
class=
"glyphicon glyphicon-remove"
></i>
Annuler
</a>
</td>
{%
endif
%}
{%
acl_end
%}
</tr>
{% endfor %}
{% endfor %}
</table>
{% if revisions_list.paginator %}
{% include "pagination.html" with list=revisions_list %}
{% endif %}
logs/templates/logs/aff_summary.html
View file @
f8428568
...
...
@@ -27,7 +27,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% endif %}
{% load logs_extra %}
{% load acl %}
<table
class=
"table table-striped"
>
<thead>
<tr>
...
...
@@ -51,14 +51,14 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% endif %}
</i>
)
</td>
{%
if is_bureau
%}
{%
can_edit_history
%}
<td>
<a
class=
"btn btn-danger btn-sm"
role=
"button"
href=
"{% url 'logs:revert-action' v.rev_id %}"
>
<i
class=
"glyphicon glyphicon-remove"
></i>
Annuler
</a>
</td>
{%
endif
%}
{%
acl_end
%}
</tr>
{% elif v.version.content_type.model == 'whitelist' %}
<tr
class=
"success"
>
...
...
@@ -74,14 +74,14 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% endif %}
</i>
)
</td>
{%
if is_bureau
%}
{%
can_edit_history
%}
<td>
<a
class=
"btn btn-danger btn-sm"
role=
"button"
href=
"{% url 'logs:revert-action' v.rev_id %}"
>
<i
class=
"glyphicon glyphicon-remove"
></i>
Annuler
</a>
</td>
{%
endif
%}
{%
acl_end
%}
</tr>
{% elif v.version.content_type.model == 'user' %}
<tr>
...
...
@@ -93,14 +93,14 @@ with this program; if not, write to the Free Software Foundation, Inc.,
(
<i>
{{ v.comment }}
</i>
)
{% endif %}
</td>
{%
if is_bureau
%}
{%
can_edit_history
%}
<td>
<a
class=
"btn btn-danger btn-sm"
role=
"button"
href=
"{% url 'logs:revert-action' v.rev_id %}"
>
<i
class=
"glyphicon glyphicon-remove"
></i>
Annuler
</a>
</td>
{%
endif
%}
{%
acl_end
%}
</tr>
{% elif v.version.content_type.model == 'vente' %}
<tr>
...
...
@@ -112,14 +112,14 @@ with this program; if not, write to the Free Software Foundation, Inc.,
(
<i>
+{{ v.version.object.duration }} mois
</i>
)
{% endif %}
</td>
{%
if is_bureau
%}
{%
can_edit_history
%}
<td>
<a
class=
"btn btn-danger btn-sm"
role=
"button"
href=
"{% url 'logs:revert-action' v.rev_id %}"
>
<i
class=
"glyphicon glyphicon-remove"
></i>
Annuler
</a>
</td>
{%
endif
%}
{%
acl_end
%}
</tr>
{% elif v.version.content_type.model == 'interface' %}
<tr>
...
...
@@ -131,14 +131,14 @@ with this program; if not, write to the Free Software Foundation, Inc.,
(
<i>
{{ v.comment }}
</i>
)
{% endif %}
</td>
{%
if is_bureau
%}
{%
can_edit_history
%}
<td>
<a
class=
"btn btn-danger btn-sm"
role=
"button"
href=
"{% url 'logs:revert-action' v.rev_id %}"
>
<i
class=
"glyphicon glyphicon-remove"
></i>
Annuler
</a>
</td>
{%
endif
%}
{%
acl_end
%}
</tr>
{% endif %}
{% endfor %}
...
...
logs/templates/logs/sidebar.html
View file @
f8428568
...
...
@@ -23,9 +23,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
{% endcomment %}
{% load acl %}
{% block sidebar %}
{%
if is_cableur
%}
{%
can_view_app logs
%}
<a
class=
"list-group-item list-group-item-info"
href=
"{% url "
logs:index
"
%}"
>
<i
class=
"glyphicon glyphicon-stats"
></i>
Résumé
...
...
@@ -50,5 +51,5 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<i
class=
"glyphicon glyphicon-stats"
></i>
Utilisateurs
</a>
{%
endif
%}
{%
acl_end
%}
{% endblock %}
re2o/templatetags/acl.py
View file @
f8428568
...
...
@@ -212,7 +212,7 @@ def acl_fct(callback, reverse):
@
register
.
tag
(
'cannot_edit_history'
)
def
acl_history_filter
(
parser
,
token
):
"""Templatetag for acl checking on history."""
tag_name
,
_
=
token
.
split_contents
()
tag_name
,
=
token
.
split_contents
()
callback
=
get_callback
(
tag_name
)
oknodes
=
parser
.
parse
((
'acl_else'
,
'acl_end'
))
...
...
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