summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 414d0a0)
raw | patch | inline | side by side (parent: 414d0a0)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 7 Sep 2006 07:10:59 +0000 (07:10 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 7 Sep 2006 07:10:59 +0000 (07:10 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4614 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/plugins/admin/applications/class_applicationGeneric.inc b/plugins/admin/applications/class_applicationGeneric.inc
index 94c6a831f372c879c2619e598b03b7a932bae9a6..0d4d5ea88d2369037dee56ada7f2ab7def015a83 100644 (file)
$smarty= get_smarty();
+ $tmp = $this->plInfo();
+ foreach($tmp['plProvidedAcls'] as $name => $translation){
+ $smarty->assign($name."ACL",$this->getacl($name));
+ }
+
+ $baseACL = $this->getacl("base");
+ if(!$this->acl_is_moveable()) {
+ $baseACL = preg_replace("/w/","",$baseACL);
+ }
+ $smarty->assign("baseACL", $baseACL);
+
/* Do we represent a valid group? */
if (!$this->is_account && $this->parent == NULL){
$display= "<img alt=\"\" src=\"images/stop.png\" align=\"middle\"> <b>".
/* Variables */
foreach(array("description", "gosaApplicationExecute", "gosaApplicationName","cn") as $val){
$smarty->assign($val, $this->$val);
- $smarty->assign($val."ACL", chkacl($this->acl, $val));
}
- $smarty->assign("baseACL", chkacl($this->acl,"base"));
/* Checkboxes */
foreach (array("G" => "exec_for_groupmembers", "O" => "overwrite_config",
$smarty->assign("isReleaseApplikation" , $this->isReleaseApplikation);
$smarty->assign("gotoLogonScript",htmlentities($this->gotoLogonScript, ENT_COMPAT, 'UTF-8'));
$smarty->assign("base_select", $this->base);
- $smarty->assign("gosaApplicationFlagsACL", chkacl($this->acl, "gosaApplicationFlags"));
/* Show main page */
return($smarty->fetch (get_template_path('generic.tpl', TRUE)));
}
if (isset($_POST['overwrite_config']) && $_POST['overwrite_config'] == 1){
$flag.= "O";
}
- if (chkacl ($this->acl, "gosaApplicationFlags") ==""){
+ if ($this->acl_is_writeable("gosaApplicationFlags")){
$this->gosaApplicationFlags= "[$flag]";
}
$this->set_picture($_FILES['picture_file']['tmp_name']);
}
-
- /* Save base, since this is no LDAP attribute */
- if (isset($_POST['base']) && chkacl($this->acl, "create") == ""){
- $this->base= $_POST['base'];
- }
+ $this->base= $_POST['base'];
}
if($this->isReleaseApplikation){
}
$ui= get_userinfo();
- $acl= get_permissions ($new_dn, $ui->subtreeACL);
- $acl= get_module_permission($acl, "application", $new_dn);
- if (chkacl($acl, "create") != ""){
+ if (!$this->acl_is_createable() && $this->dn == "new"){
$message[]= _("You have no permissions to create a application on this 'Base'.");
}
"objectClass" => "gosaApplication")),
"plProvidedAcls"=> array(
"cn" => _("Name"),
+ "base" => _("Base"),
"description" => _("Description"),
"gosaApplicationExecute" => _("Execute"),
"gosaApplicationName" => _("Name"),
index 30a0d22155fd468c652783532d6a242b1150ac99..78ee97f97266ff1f79d4049bc7fceba7f0476d78 100644 (file)
<table summary="">
<tr>
<td><LABEL for="cn">{t}Application name{/t}{$must}</LABEL></td>
- <td><input id="cn" name="cn" size=25 maxlength=60 value="{$cn}" title="{t}Application name{/t}" {$cnACL}></td>
+ <td>
+{render acl=$cnACL}
+ <input id="cn" name="cn" size=25 maxlength=60 value="{$cn}" title="{t}Application name{/t}">
+{/render}
+ </td>
</tr>
<tr>
<td><LABEL for="gosaApplicationName">{t}Display name{/t}</LABEL></td>
<td>
- <input id="gosaApplicationName" name="gosaApplicationName" size=35 maxlength=60 {$gosaApplicationNameACL} value="{$gosaApplicationName}" title="{t}Application name to be displayed (i.e. below icons){/t}">
+{render acl=$gosaApplicationNameACL}
+ <input id="gosaApplicationName" name="gosaApplicationName" size=35 maxlength=60
+ value="{$gosaApplicationName}" title="{t}Application name to be displayed (i.e. below icons){/t}">
+{/render}
</td>
</tr>
<tr>
<td><LABEL for="gosaApplicationExecute">{t}Execute{/t}{$must}</LABEL></td>
<td>
- <input id="gosaApplicationExecute" name="gosaApplicationExecute" size=35 maxlength=60 {$gosaApplicationExecuteACL} value="{$gosaApplicationExecute}" title="{t}Path and/or binary name of application{/t}">
+{render acl=$gosaApplicationExecuteACL}
+ <input id="gosaApplicationExecute" name="gosaApplicationExecute" size=35 maxlength=60
+ value="{$gosaApplicationExecute}" title="{t}Path and/or binary name of application{/t}">
+{/render}
</td>
</tr>
<tr>
<td><LABEL for="description">{t}Description{/t}</LABEL></td>
<td>
- <input id="description" name="description" size=35 maxlength=80 {$descriptionACL} value="{$description}">
+{render acl=$descriptionACL}
+ <input id="description" name="description" size=35 maxlength=80 value="{$description}">
+{/render}
</td>
</tr>
-
<tr><td colspan=2><div style="height:15px;"></div></td></tr>
-
<tr>
<td><LABEL for="base">{t}Base{/t}{$must}</LABEL></td>
<td>
+{render acl=$baseACL}
<select size="1" id="base" name="base" title="{t}Choose subtree to place application in{/t}"
- {if $isReleaseApplikation} disabled {/if} {$baseACL}>
+ {if $isReleaseApplikation} disabled {/if}>
{html_options options=$bases selected=$base_select}
</select>
- {if $baseACL == "" && !$isReleaseApplikation}
- <input type="image" name="chooseBase" src="images/folder.png" class="center" title="{t}Select a base{/t}">
- {else}
- <img src="images/folder_gray.png" class="center" title="{t}Select a base{/t}">
- {/if}
-
+{/render}
+{render acl=$baseACL disable_picture='images/folder_gray.png'}
+ <input type="image" name="chooseBase" src="images/folder.png" class="center" title="{t}Select a base{/t}">
+{/render}
</td>
</tr>
</table>
</td>
<td style="vertical-align:top">
<br>
+
<input type="hidden" name="MAX_FILE_SIZE" value="100000">
+{render acl=$gosaApplicationIconACL}
<input name="picture_file" type="file" size="20" maxlength="255" accept="image/*.png" id="picture_file">
+{/render}
+{render acl=$gosaApplicationIconACL}
<input type="submit" name="update" value="{t}Update{/t}" title="{t}Reload picture from LDAP{/t}">
+{/render}
</td>
</tr>
</table>
<table summary="" style="width:100%;">
<tr>
<td style="width:50%;border-right:1px solid #B0B0B0; vertical-align:top">
- <input type=checkbox name="exec_for_groupmembers" value="1" {$gosaApplicationFlagsACL} {$exec_for_groupmembers}>{t}Only executable for members{/t}
+{render acl=$gosaApplicationFlagsACL}
+ <input type=checkbox name="exec_for_groupmembers" value="1" {$exec_for_groupmembers}>
+{/render}
+ {t}Only executable for members{/t}
<br>
- <input type=checkbox name="overwrite_config" value="1" {$gosaApplicationFlagsACL} {$overwrite_config}>{t}Replace user configuration on startup{/t}
+{render acl=$gosaApplicationFlagsACL}
+ <input type=checkbox name="overwrite_config" value="1" {$overwrite_config}>
+{/render}
+ {t}Replace user configuration on startup{/t}
</td>
<td>
- <input type=checkbox name="place_on_desktop" value="1" {$gosaApplicationFlagsACL} {$place_on_desktop}>
+{render acl=$gosaApplicationFlagsACL}
+ <input type=checkbox name="place_on_desktop" value="1" {$place_on_desktop}>
+{/render}
{t}Place icon on members desktop{/t}
<br>
- <input type=checkbox name="place_in_startmenu" value="1" {$gosaApplicationFlagsACL} {$place_in_startmenu}>
+{render acl=$gosaApplicationFlagsACL}
+ <input type=checkbox name="place_in_startmenu" value="1" {$place_in_startmenu}>
+{/render}
{t}Place entry in members startmenu{/t}
<br>
- <input type=checkbox name="place_on_kicker" value="1" {$gosaApplicationFlagsACL} {$place_on_kicker}>
+{render acl=$gosaApplicationFlagsACL}
+ <input type=checkbox name="place_on_kicker" value="1" {$place_on_kicker}>
+{/render}
{t}Place entry in members launch bar{/t}
</td>
</tr>
<tr>
<td>
<h2><img src="images/fai_script.png" alt="{t}Script{/t}" align="middle"> {t}Script{/t}</h2>
+{render acl=$gotoLogonScriptACL}
<textarea name="gotoLogonScript" style='width:99%;height:220px;'>{$gotoLogonScript}</textarea>
+{/render}
+{render acl=$gotoLogonScriptACL}
<input type="file" name="ScriptFile" value="{t}Import{/t}">
+{/render}
+{render acl=$gotoLogonScriptACL}
<input type="submit" name="upLoad" value="{t}Upload{/t}">
+{/render}
<a href='getbin?rand={$rand}'><img src='images/save.png' title='{t}Download{/t}' alt='{t}Download{/t}'></a>
</td>
</tr>
diff --git a/plugins/admin/applications/tabs_application.inc b/plugins/admin/applications/tabs_application.inc
index 594b057352c23f8b4c311229f80f2cba0c23c8f5..ec83a085105fa8785b1fe9d1534e227e8307289c 100644 (file)
{
var $Release= "";
- function apptabs($config, $data, $dn)
+ function apptabs($config, $data, $dn,$category)
{
- tabs::tabs($config, $data, $dn);
+ tabs::tabs($config, $data, $dn,$category);
/* Add references/acls/snapshots */
$this->addSpecialTabs();