mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-12-26 08:53:46 +00:00
Add some comments et comment field sur ServiceUser
This commit is contained in:
parent
e940782bc9
commit
ba4bf07a4f
5 changed files with 28 additions and 2 deletions
20
users/migrations/0050_serviceuser_comment.py
Normal file
20
users/migrations/0050_serviceuser_comment.py
Normal 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),
|
||||||
|
),
|
||||||
|
]
|
|
@ -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])
|
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)
|
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'
|
USERNAME_FIELD = 'pseudo'
|
||||||
|
|
||||||
|
@ -723,7 +724,7 @@ class ServiceUserForm(ModelForm):
|
||||||
|
|
||||||
class EditServiceUserForm(ServiceUserForm):
|
class EditServiceUserForm(ServiceUserForm):
|
||||||
class Meta(ServiceUserForm.Meta):
|
class Meta(ServiceUserForm.Meta):
|
||||||
fields = ['access_group']
|
fields = ['access_group','comment']
|
||||||
|
|
||||||
class StateForm(ModelForm):
|
class StateForm(ModelForm):
|
||||||
class Meta:
|
class Meta:
|
||||||
|
|
|
@ -27,6 +27,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
<tr>
|
<tr>
|
||||||
<th>Nom</th>
|
<th>Nom</th>
|
||||||
<th>Rôle</th>
|
<th>Rôle</th>
|
||||||
|
<th>Commentaire</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
@ -34,6 +35,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ serviceuser.pseudo }}</td>
|
<td>{{ serviceuser.pseudo }}</td>
|
||||||
<td>{{ serviceuser.access_group }}</td>
|
<td>{{ serviceuser.access_group }}</td>
|
||||||
|
<td>{{ serviceuser.comment }}</td>
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
{% include 'buttons/suppr.html' with href='users:del-serviceuser' id=serviceuser.id %}
|
{% include 'buttons/suppr.html' with href='users:del-serviceuser' id=serviceuser.id %}
|
||||||
{% include 'buttons/edit.html' with href='users:edit-serviceuser' id=serviceuser.id %}
|
{% include 'buttons/edit.html' with href='users:edit-serviceuser' id=serviceuser.id %}
|
||||||
|
|
|
@ -29,6 +29,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h2>Liste des Établissements</h2>
|
<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-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>
|
<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 %}
|
{% include "users/aff_schools.html" with school_list=school_list %}
|
||||||
|
|
|
@ -28,7 +28,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
{% block title %}Utilisateurs{% endblock %}
|
{% block title %}Utilisateurs{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% 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>
|
<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 %}
|
{% include "users/aff_serviceusers.html" with serviceusers_list=serviceusers_list %}
|
||||||
<br />
|
<br />
|
||||||
|
|
Loading…
Reference in a new issue