diff options
author | Buchan Milne <buchan@mageia.org> | 2010-11-03 09:37:24 +0000 |
---|---|---|
committer | Buchan Milne <buchan@mageia.org> | 2010-11-03 09:37:24 +0000 |
commit | 41074cf0bc2da78eaffef8eca757a76d5e08fc34 (patch) | |
tree | 45b5be0346bcff5205e2afef46f316c3bf1f6984 /root | |
parent | a2976ea837ac446e02681402db35976fa3e4f380 (diff) | |
download | identity-41074cf0bc2da78eaffef8eca757a76d5e08fc34.tar identity-41074cf0bc2da78eaffef8eca757a76d5e08fc34.tar.gz identity-41074cf0bc2da78eaffef8eca757a76d5e08fc34.tar.bz2 identity-41074cf0bc2da78eaffef8eca757a76d5e08fc34.tar.xz identity-41074cf0bc2da78eaffef8eca757a76d5e08fc34.zip |
Add some account admin features
Diffstat (limited to 'root')
-rw-r--r-- | root/admin/account.tt | 47 | ||||
-rw-r--r-- | root/admin/account_addoc.tt | 27 | ||||
-rw-r--r-- | root/admin/account_group.tt | 24 | ||||
-rw-r--r-- | root/admin/account_modify.tt | 66 | ||||
-rw-r--r-- | root/admin/account_promote.tt | 34 | ||||
-rw-r--r-- | root/admin/group.tt | 38 | ||||
-rw-r--r-- | root/admin/group_modify.tt | 22 | ||||
-rw-r--r-- | root/admin/index.tt | 1 |
8 files changed, 259 insertions, 0 deletions
diff --git a/root/admin/account.tt b/root/admin/account.tt new file mode 100644 index 0000000..b00b8a4 --- /dev/null +++ b/root/admin/account.tt @@ -0,0 +1,47 @@ +<form method='POST'> +<table> +<tr> +<td> +Search by +</td> +<td> +<select name="attribute"> +<option value="uid">Username</option> +<option value="mail">Email</option> +<option value="cn">Full Name</option> +<option value="sn">Surname</option> +</select> +</td> +<!-- td> +<select name="matchtype"> +<option value="substring">contains</option> +<option value="exact">is exactly</option> +<option value="gte">greater than or equal to</option> +<option value="lt">less than</option> +</select> +</td --> +<td><input name='value'></td> +</table> +</form> +[% IF entries %] +<table border=0> +<tr> +<th>Username</th> +<th>Email</th> +<th>First Name</th> +<th>Surname</td> +<th>Full Name</td> +</tr> +[% FOREACH entry IN entries %] +<tr> +<td><a href="[% c.uri_for('/admin/account_modify') %]/[% entry.uid %]">[% entry.uid %]</a></td> +<td>[% entry.mail %]</td> +<td>[% entry.givenName %]</td> +<td>[% entry.sn %]</td> +<td>[% entry.cn %]</td> +</tr> +[% END %] +</table> +[% END %] + + diff --git a/root/admin/account_addoc.tt b/root/admin/account_addoc.tt new file mode 100644 index 0000000..771ac8d --- /dev/null +++ b/root/admin/account_addoc.tt @@ -0,0 +1,27 @@ +Adding objectclass [% oc %] to dn [% dn %] +<form method=post> +<input type=hidden name='dn' value='[% dn %]'> +<input type=hidden name='uid' value='[% uid %]'> +<input type='hidden' name='objectclass' value='[% oc %]'> +<table> +<tr> +<th>Attribute</th> +<th>Value</th> +</tr> +[% FOREACH attr IN must %] +[% IF attr != "objectClass" %] +<tr> +<td>[% attr %]</td> +<td><input name='[% attr %]'><span color='red'>*</span></td> +</tr> +[% END %] +[% END %] +[% FOREACH attr IN may %] +<tr> +<td>[% attr %]</td> +<td><input name='[% attr %]'></td> +</tr> +[% END %] +</table> +<input type='submit' value='Add'> + diff --git a/root/admin/account_group.tt b/root/admin/account_group.tt new file mode 100644 index 0000000..3b04992 --- /dev/null +++ b/root/admin/account_group.tt @@ -0,0 +1,24 @@ +Add user [% uid %] to a new group: + +<form method='post'> +<input type='hidden' name='uid' value='[% uid %]'> +<input type='hidden' name='op' value='add'> +<select name='group'> +[% FOREACH group IN newgroups %] +<option value='[% group.cn %]'>[% group.cn %]</option> +[% END %] +</select> +<input type='submit' value='Add'> +</form> + +Delete user [% uid %] from an existing group: +<form method='post'> +<input type='hidden' name='uid' value='[% uid %]'> +<input type='hidden' name='op' value='delete'> +<select name='group'> +[% FOREACH group IN groups %] +<option value='[% group.cn %]'>[% group.cn %]</option> +[% END %] +</select> +<input type='submit' value='Delete'> +</form> diff --git a/root/admin/account_modify.tt b/root/admin/account_modify.tt new file mode 100644 index 0000000..6a1ecc8 --- /dev/null +++ b/root/admin/account_modify.tt @@ -0,0 +1,66 @@ +<a href="[% c.uri_for('/admin/password') %]/[% uid %]">Reset password</a> +<a href="[% c.uri_for('/admin/account_group') %]/[% uid %]">Groups</a> + +<form method=post> +<input type='hidden' name='operation' value='replace'> +<table border=0> +<tr><th>Attribute</th><th>Value</th></tr> +[% FOREACH attr IN values %] + <tr> + <td>[% attr.name %]</td> + <td>[% FOREACH val IN attr.values %][% IF attr.editable %]<input type=hidden name="[% attr.name %]_old" value="[% val %]"><input name="[% attr.name %]_new" value="[% val %]">[% ELSE %][% val %]<br/>[% END %] +[% IF attr.addable AND attr.editable %]<a href="[% c.uri_for('/admin/account_edit') %]/add/[% attr.name %]">Add</a>[% END %] +[% IF attr.removable AND attr.editable %]<a href="[% c.uri_for('/admin/account_modifydel') %]/[% uid %]/[% attr.name %]/[% val %]">Delete</a>[% END %] + [% END %]</td> + </tr> +[% END %] +<tr><td colspan=2 align=center><input type='Submit' value='Update'></td></tr> +</table> +</form> + +<table border=0> +<tr> +<td> +<form method=post action="[% c.uri_for('/admin/account_modify') %]/[% uid %]"> +<input type='hidden' name='operation' value='add'> + Add attribute + <select name='attribute'>[% FOREACH attr IN may %] + <option value="[% attr %]">[% attr %]</option>[% END %] + </select> + with value +<input name='value'> + <input type=submit value='Add'> +</form> +</td> +</tr> +[% IF groups %] +<tr> +<td> +Promote user to posixAccount with primary group: +<form method=post action="[% c.uri_for('/admin/account_promote') %]"> +<input type='hidden' name='dn' value='[% dn %]'> +<select name='gid'> +[% FOREACH group IN groups %] +<option value='[% group.gidNumber %]'>[% group.name %]</option> +[% END %] +</select> +<input type=submit value='Promote'> +</form> +</td> +</tr> +[% END %] +<tr> +<td> +<form method=post action="[% c.uri_for('/admin/account_addoc') %]"> +<input type='hidden' name='dn' value='[% dn %]'> +<input type='hidden' name='uid' value='[% uid %]'> +<select name='objectclass'> +[% FOREACH oc IN offer_ocs %] +<option value='[% oc %]'>[% oc %]</option> +[% END %] +</select> +<input type='submit' value='Add ObjectClass'> +</form> +</td> +</tr> +</table> diff --git a/root/admin/account_promote.tt b/root/admin/account_promote.tt new file mode 100644 index 0000000..fd6400e --- /dev/null +++ b/root/admin/account_promote.tt @@ -0,0 +1,34 @@ +<form method=post> +<table border=0> +<tr> +<th>Select</th> +<th>Username</th> +<th>Email</th> +<th>First Name</th> +<th>Surname</td> +<th>Full Name</td> +</tr> +[% FOREACH entry IN entries %] +<tr> +<td><input type='checkbox' name='username' value="[% entry.uid %]"> +<td>[% entry.uid %]</td> +<td>[% entry.mail %]</td> +<td>[% entry.givenName %]</td> +<td>[% entry.sn %]</td> +<td>[% entry.cn %]</td> +</tr> +[% END %] +</table> + +<table border=0> +<tr> +<td>Primary group</td> +<td><select name='gid'> +[% FOREACH group IN groups %] +<option value=[% group.gidNumber %]>[% group.cn %]</option> +[% END %] +</td> +<td> +<input type='submit' value='Promote'> +</table> +</form> diff --git a/root/admin/group.tt b/root/admin/group.tt new file mode 100644 index 0000000..50c6bde --- /dev/null +++ b/root/admin/group.tt @@ -0,0 +1,38 @@ +<form method='POST'> +<table> +<tr> +<td> +Search by +</td> +<td> +<select name="attribute"> +<option value="cn">Group name</option> +<option value="member">member</option> +</select> +</td> +<!-- td> +<select name="matchtype"> +<option value="substring">contains</option> +<option value="exact">is exactly</option> +<option value="gte">greater than or equal to</option> +<option value="lt">less than</option> +</select> +</td --> +<td><input name='value'></td> +</table> +</form> +[% IF entries %] +<table border=0> +<tr> +<th>Group Name</th> +</tr> +[% FOREACH entry IN entries %] +<tr> +<td><a href="[% c.uri_for('/admin/group_modify') %]/[% entry.cn %]">[% entry.cn %]</a></td> +<td>[% entry.cn %]</td> +</tr> +[% END %] +</table> +[% END %] + + diff --git a/root/admin/group_modify.tt b/root/admin/group_modify.tt new file mode 100644 index 0000000..01520d5 --- /dev/null +++ b/root/admin/group_modify.tt @@ -0,0 +1,22 @@ +<form method=post> +<input type='hidden' name='dn' value='[% group.dn %]'> +<table> +<tr> +<th>Attribute</th> +<th>Value</th> +</tr> +[% FOREACH attr IN group.attributes %] +<tr> +<td> +[% attr %] +</td> +<td> +[% FOREACH value IN group.get_value(attr) %] +[% value %] <a href="[% c.uri_for('/admin/group_modify') %]/delete/[% group.dn %]/[% attr %]/[% value %]">delete</a><br/> +[% END %] +<input name='[% attr %]'> +<input type='submit' value='Add'> +</td> +</tr> +[% END %] +</table> diff --git a/root/admin/index.tt b/root/admin/index.tt new file mode 100644 index 0000000..a603c30 --- /dev/null +++ b/root/admin/index.tt @@ -0,0 +1 @@ +Please use the menus above |