summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1713b09)
raw | patch | inline | side by side (parent: 1713b09)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 26 Oct 2009 12:02:23 +0000 (12:02 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 26 Oct 2009 12:02:23 +0000 (12:02 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14637 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/gosa-core/plugins/admin/users/class_userManagement.inc b/gosa-core/plugins/admin/users/class_userManagement.inc
index 318919df7d78388621caf54594eddbe8fd487d9f..b2079be03973534b201a5bcc98bed86bfe67e096 100644 (file)
function __construct($config,$ui)
{
+ $this->config = $config;
+ $this->ui = $ui;
+
// Build filter
$filter = new filter(get_template_path("user-filter.xml", true));
$filter->setObjectStorage("ou=people,");
// Build headpage
$headpage = new listing(get_template_path("user-list.xml", true));
+ $headpage->registerElementFilter("lockLabel", "userManagement::filterLockLabel");
+ $headpage->registerElementFilter("lockImage", "userManagement::filterLockImage");
$headpage->setFilter($filter);
$this->cpHandler = new CopyPasteHandler($this->config);
+ $this->snapHandler = new SnapshotHandler($this->config);
parent::__construct($config, $ui, "users", $headpage);
$this->newEntry();
$this->tabObject->set_template_mode ();
}
+static function filterLockImage($userPassword)
+ {
+ $image= "images/empty.png";
+
+ if(isset($userPassword[0]) && preg_match("/^\{[^\}]/",$userPassword[0])){
+ if(preg_match("/^[^\}]*+\}!/",$userPassword[0])){
+ $image= "images/lists/locked.png";
+ }else{
+ $image= "images/lists/unlocked.png";
+ }
+ }
+
+ return $image;
+ }
+
+
+ static function filterLockLabel($userPassword)
+ {
+ $label= "";
+
+ if(isset($userPassword[0]) && preg_match("/^\{[^\}]/",$userPassword[0])){
+ if(preg_match("/^[^\}]*+\}!/",$userPassword[0])){
+ $label= _("Unlock account");
+ }else{
+ $label= _("Lock account");
+ }
+ }
+
+ return $label;
+ }
+
+
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>
diff --git a/gosa-core/plugins/admin/users/user-filter.xml b/gosa-core/plugins/admin/users/user-filter.xml
index 1042de9b688063a09fc5da7871a46e8d7ca8816c..71042d2fc39ee56d54e5c5bf893516ecf46db219 100644 (file)
<attribute>customerNumber</attribute>
<attribute>customerState</attribute>
<attribute>dateOfBirth</attribute>
+ <attribute>userPassword</attribute>
</query>
<scope>one</scope>
</search>
diff --git a/gosa-core/plugins/admin/users/user-list.xml b/gosa-core/plugins/admin/users/user-list.xml
index c7d5423a640aa8cc4e858d1455ba3bb717f39b30..e906af6c68bc370bbfb8e85ac3e6abe186ad570c 100644 (file)
</definition>
<table>
- <layout>|20px||260px|100px|120px|60px;c|140px;r|</layout>
+ <layout>|20px||260px|180px;r|</layout>
<department>
<value>%{filter:objectType(dn,objectClass)}</value>
<department>
<value>%{filter:departmentLink(row,dn,description)}</value>
- <span>5</span>
+ <span>3</span>
</department>
<column>
<type>separator</type>
</action>
- <action>
- <name>cp</name>
- <type>copypaste</type>
- </action>
-
<action>
<type>separator</type>
</action>
<actiontriggers snapshot="true" copypaste="true">
+ <action>
+ <name>cp</name>
+ <objectclass>!gosaUserTemplate</objectclass>
+ <type>copypaste</type>
+ </action>
+
<action>
<name>edit</name>
<type>entry</type>
<objectclass>gosaAccount</objectclass>
<image>images/lists/edit.png</image>
- <label>Edit person</label>
+ <label>Edit user</label>
+ </action>
+
+ <action>
+ <name>lock</name>
+ <type>entry</type>
+ <objectclass>!gosaUserTemplate</objectclass>
+ <image>%{filter:lockImage(userPassword)}</image>
+ <acl>uniBonnAccount/password[w]</acl>
+ <label>%{filter:lockLabel(userPassword)}</label>
+ </action>
+
+ <action>
+ <name>password</name>
+ <type>entry</type>
+ <objectclass>!gosaUserTemplate</objectclass>
+ <image>plugins/users/images/list_password.png</image>
+ <label>Change password</label>
+ </action>
+
+ <action>
+ <name>snapshot</name>
+ <type>snapshot</type>
+ <objectclass>!gosaUserTemplate</objectclass>
</action>
<action>
<image>images/lists/trash.png</image>
<objectclass>gosaAccount</objectclass>
<acl>users/user[d]</acl>
- <label>Remove person</label>
- </action>
-
- <action>
- <name>cp</name>
- <type>copypaste</type>
- <acl>users/user[w]</acl>
+ <label>Remove user</label>
</action>
</actiontriggers>