summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8a7140b)
raw | patch | inline | side by side (parent: 8a7140b)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 31 Mar 2010 08:33:57 +0000 (08:33 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 31 Mar 2010 08:33:57 +0000 (08:33 +0000) |
-We were able to remove frozen apps
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17423 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17423 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/gosa-plugins/goto/admin/applications/application-filter-release.xml b/gosa-plugins/goto/admin/applications/application-filter-release.xml
index 35702f59adc3124a226ad845c3038f373960e8d1..e0b32866e5646cb8d8c5128ed446e02267301726 100644 (file)
<attribute>objectClass</attribute>
<attribute>cn</attribute>
<attribute>description</attribute>
+ <attribute>FAIstate</attribute>
<scope>auto</scope>
<default>default</default>
diff --git a/gosa-plugins/goto/admin/applications/application-filter.xml b/gosa-plugins/goto/admin/applications/application-filter.xml
index 0cfdd58d3270e17313a774d99774fd8d45c942c3..f0f0436e67503e005ba5addcec0de431cbfa94a8 100644 (file)
<attribute>objectClass</attribute>
<attribute>cn</attribute>
<attribute>description</attribute>
+ <attribute>FAIstate</attribute>
</definition>
<search>
diff --git a/gosa-plugins/goto/admin/applications/application-list-release.xml b/gosa-plugins/goto/admin/applications/application-list-release.xml
index 6ea5a8d8ba82d47d6435103a526e7454413310a8..f53a65b8a891f2a5b4f99aec53777bfc6e69bc5e 100644 (file)
<action>
<type>sub</type>
- <image>images/lists/new.png</image>
+ <image>images/lists/element.png[new]</image>
<label>Create</label>
<action>
<name>new</name>
<type>entry</type>
- <image>images/lists/new.png</image>
+ <image>plugins/goto/images/select_application.png[new]</image>
<label>Application</label>
</action>
</action>
diff --git a/gosa-plugins/goto/admin/applications/class_applicationManagement.inc b/gosa-plugins/goto/admin/applications/class_applicationManagement.inc
index 08605166e038c57a0c23db063f8fdab8814d0f85..e8ee575ff233ea3df3b6da00e047552fea9f5add 100644 (file)
}
+ /*! \brief Someone wants to remove some object(s)
+ * ask for a confirmation now.
+ */
+ function removeEntryRequested($action="",$target=array(),$all=array(),
+ $altTabClass ="", $altTabType = "", $altAclCategory="")
+ {
+ // Close dialogs and remove locks for currently handled dns
+ $this->cancelEdit();
+
+ // Do not allow to remove objects with state freeezed
+ $errors = $disallowed = array();
+ $headpage = $this->getHeadpage();
+ foreach($target as $dn){
+
+ $obj = $headpage->getEntry($dn);
+ $acl = $this->ui->get_permissions($obj['dn'],"application/application");
+ if(!preg_match("/d/",$acl)){
+ $disallowed[] = $obj['dn'];
+ }elseif(isset($obj['FAIstate']) && preg_match('/freeze/i', $obj['FAIstate'][0])){
+ $errors[] = $obj['dn'];
+ }else{
+ $this->dns[] = $obj['dn'];
+ }
+ }
+ if(count($errors)){
+ msg_dialog::display(_("Branch locked"),
+ sprintf(_("The following entries are locked, you can't remove them %s."),msgPool::buildList($errors)), INFO_DIALOG);
+ }
+ if(count($disallowed)){
+ msg_dialog::display(_("Permission error"), msgPool::permDelete($disallowed), ERROR_DIALOG);
+ }
+ return(management::removeEntryRequested($action, $this->dns));
+ }
+
+
/*! \brief Overridden render method of class mangement.
* this allows us to add a release selection box.
*/