8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-12-25 08:23:46 +00:00

Add some comments et comment field sur ServiceUser

This commit is contained in:
Gabriel Detraz 2017-06-18 19:24:53 +02:00 committed by root
parent e940782bc9
commit ba4bf07a4f
5 changed files with 28 additions and 2 deletions

View file

@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2017-06-18 16:50
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('users', '0049_auto_20170618_1424'),
]
operations = [
migrations.AddField(
model_name='serviceuser',
name='comment',
field=models.CharField(blank=True, help_text='Commentaire', max_length=255),
),
]

View file

@ -385,6 +385,7 @@ class ServiceUser(AbstractBaseUser):
pseudo = models.CharField(max_length=32, unique=True, help_text="Doit contenir uniquement des lettres, chiffres, ou tirets", validators=[linux_user_validator])
access_group = models.CharField(choices=ACCESS, default=readonly, max_length=32)
comment = models.CharField(help_text="Commentaire", max_length=255, blank=True)
USERNAME_FIELD = 'pseudo'
@ -723,7 +724,7 @@ class ServiceUserForm(ModelForm):
class EditServiceUserForm(ServiceUserForm):
class Meta(ServiceUserForm.Meta):
fields = ['access_group']
fields = ['access_group','comment']
class StateForm(ModelForm):
class Meta:

View file

@ -27,6 +27,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<tr>
<th>Nom</th>
<th>Rôle</th>
<th>Commentaire</th>
<th></th>
</tr>
</thead>
@ -34,6 +35,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<tr>
<td>{{ serviceuser.pseudo }}</td>
<td>{{ serviceuser.access_group }}</td>
<td>{{ serviceuser.comment }}</td>
<td class="text-right">
{% include 'buttons/suppr.html' with href='users:del-serviceuser' id=serviceuser.id %}
{% include 'buttons/edit.html' with href='users:edit-serviceuser' id=serviceuser.id %}

View file

@ -29,6 +29,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% block content %}
<h2>Liste des Établissements</h2>
<h5>Ensemble des établissements d'enseignement ou d'activité des utilisateurs crées</h5>
<a class="btn btn-primary btn-sm" role="button" href="{% url 'users:add-school' %}"><i class="glyphicon glyphicon-plus"></i> Ajouter un établissement</a>
<a class="btn btn-danger btn-sm" role="button" href="{% url 'users:del-school' %}"><i class="glyphicon glyphicon-trash"></i> Supprimer un ou plusieurs établissements</a>
{% include "users/aff_schools.html" with school_list=school_list %}

View file

@ -28,7 +28,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% block title %}Utilisateurs{% endblock %}
{% block content %}
<h2>Liste des service users</h2>
<h2>Liste des service users LDAP</h2>
<h5>Les service users LDAP sont des utilisateurs spéciaux qui disposent d'un accès uniquement sur le ldap pour effectuer des opération d'authentification.
Il est recommandé de créer un service-user doté d'un login/mdp par service concerné</h5>
<a class="btn btn-primary btn-sm" role="button" href="{% url 'users:new-serviceuser' %}"><i class="glyphicon glyphicon-plus"></i> Ajouter un service user</a>
{% include "users/aff_serviceusers.html" with serviceusers_list=serviceusers_list %}
<br />