Commit 01de801b authored by Mathieu Giraud's avatar Mathieu Giraud Committed by Vidjil Team
Browse files

controllers/, views/user: access and groups in the user table

parent 73c1a24a
......@@ -8,10 +8,19 @@ if request.env.http_origin:
def index():
query = db(db.auth_user).select()
for row in query :
row.created = db( db.patient.creator == ).count()
row.access = ''
if auth.has_permission('create', 'patient', 0, row.access += 'c'
if auth.has_permission('upload', 'sequence_file', 0, row.access += 'u'
if auth.has_permission('run', 'results_file', 0, row.access += 'r'
q = [g.group_id for g in db(]
row.groups = ' '.join([str(g) for g in q])
row.size = 0
row.files = 0
query_size = db( db.sequence_file.provider == ).select()
......@@ -7,11 +7,13 @@
<div id="db_table_container">
<table class="db_table" id="table">
<tr><td class="column_100">id</td>
<tr><td class="column_50">id</td>
<td class="column_200"> name</td>
<td> @</td>
<td class="colum1">patients created </td>
<td class="colum1">files uploaded </td>
<td class="column_200"> @</td>
<td class="column_50">access</td>
<td class="column_100">groups</td>
<td class="column_50">patients created </td>
<td class="column_100">files uploaded </td>
......@@ -20,6 +22,8 @@
<td> {{}}</td>
<td> {{=row.first_name}} {{=row.last_name}}</td>
<td> {{}} </td>
<td> {{=row.access}} </td>
<td> {{=row.groups}} </td>
<td> {{=row.created}} </td>
<td> {{=row.files}} ({{=vidjil_utils.format_size(row.size)}}) </td>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment