summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1ab5a96)
raw | patch | inline | side by side (parent: 1ab5a96)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 19 May 2011 12:31:35 +0000 (12:31 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 19 May 2011 12:31:35 +0000 (12:31 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20887 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/gosa-plugins/goto/admin/systems/goto/Device/InstallRecipe.tpl b/gosa-plugins/goto/admin/systems/goto/Device/InstallRecipe.tpl
index 096d14cbe4a8890c59eb8343438d17e327ce49a7..0750f4d8cecc9293aa784ceb586d9c66cbb4de68 100644 (file)
<tr>
<td><LABEL for="installTemplate">{t}Template{/t}</LABEL></td>
<td>
+ {render acl=$installTemplateACL}
<select name="installTemplate" size=1 onChange="document.mainform.submit();">
{html_options options=$installTemplateList
selected=$installTemplate}
</select>
+ {/render}
</td>
</tr>
<tr>
<td><LABEL for="installRelease">{t}Release{/t}</LABEL></td>
<td>
+ {render acl=$installReleaseACL}
<select name="installRelease" size=1 onChange="document.mainform.submit();">
{html_options options=$installReleaseList
selected=$installRelease}
</select>
+ {/render}
</td>
</tr>
<tr>
<td><LABEL for="installConfigManagement">{t}Config management{/t}</LABEL></td>
<td>
+ {render acl=$installConfigManagementACL}
<select name="installConfigManagement" size=1 onChange='document.mainform.submit();'>
{html_options options=$installConfigManagementList
selected=$installConfigManagement}
</select>
+ {/render}
</td>
</tr>
</table>
<tr>
<td><LABEL for="installPartitionTable">{t}Partition table{/t}</LABEL></td>
<td>
+ {render acl=$installPartitionTableACL}
<input type='submit' name="edit_installPartitionTable" id="edit_installPartitionTable"
value="{t}Edit partition table{/t}">
+ {/render}
</td>
</tr>
</table>
<tr>
<td><LABEL for="installMirror">{t}Mirror{/t}</LABEL></td>
<td>
+ {render acl=$installMirrorACL}
<select name="installMirror" size=1>
{html_options options=$installMirrorList
selected=$installMirror}
</select>
+ {/render}
</td>
</tr>
<tr>
<td><LABEL for="installKernelPackage">{t}Kernel package{/t}</LABEL></td>
<td>
+ {render acl=$installKernelPackageACL}
<select name="installKernelPackage" size=1>
{html_options values=$installKernelPackageList output=$installKernelPackageList
selected=$installKernelPackage}
</select>
+ {/render}
</td>
</tr>
</table>
<table>
<tr>
<td>
+ {render acl=$installRootEnabledACL}
<input type='checkbox' value='1' {if $installRootEnabled} checked {/if}
onClick="changeState('setPasswordHash');"
name="installRootEnabled" id="installRootEnabled"
>
+ {/render}
<LABEL for="installRootEnabled">{t}Use root user{/t}</LABEL>
+ {render acl=$installRootPasswordHashACL}
<button name='setPasswordHash'
{if !$installRootEnabled} disabled {/if}
id="setPasswordHash">{t}Set password{/t}</button>
+ {/render}
</td>
</tr>
</table>
<tr>
<td><LABEL for="installKeyboardlayout">{t}Keyboard layout{/t}</LABEL></td>
<td>
+ {render acl=$installKeyboardlayoutACL}
<select name="installKeyboardlayout" size=1>
{html_options options=$installKeyboardlayoutList
selected=$installKeyboardlayout}
</select>
+ {/render}
</td>
</tr>
<tr>
<td><LABEL for="installSystemLocale">{t}System locale{/t}</LABEL></td>
<td>
+ {render acl=$installSystemLocaleACL}
<select name="installSystemLocale" size=1>
{html_options options=$installSystemLocaleList
selected=$installSystemLocale}
</select>
+ {/render}
</td>
</tr>
</table>
<table>
<tr>
<td>
+ {render acl=$installTimeUTCACL}
<input type='checkbox' name="installTimeUTC" id="installTimeUTC"
{if $installTimeUTC} checked {/if}>
<LABEL for="installTimeUTC">{t}Use UTC{/t}</LABEL>
+ {/render}
</td>
</tr>
<tr>
<td><LABEL for="installTimezone">{t}Timezone{/t}</LABEL></td>
<td>
+ {render acl=$installTimezoneACL}
<select size='1' name="installTimezone" id="installTimezone">
{html_options output=$timezones values=$timezones
selected=$installTimezone}
</select>
+ {/render}
</td>
</tr>
<tr>
<td colspan=2>
{t}NTP server{/t}
- {$installNTPServerList}
- <input type='text' name="installNTPServer_Input">
- <button name='installNTPServer_Add'>{msgPool type=addButton}</button>
+ {render acl=$installNTPServerACL}
+ {$installNTPServerList}
+ {/render}
+ {render acl=$installNTPServerACL}
+ <input type='text' name="installNTPServer_Input">
+ {/render}
+ {render acl=$installNTPServerACL}
+ <button name='installNTPServer_Add'>{msgPool type=addButton}</button>
+ {/render}
</td>
</tr>
</table>
diff --git a/gosa-plugins/goto/admin/systems/goto/Device/class_DeviceConfig.inc b/gosa-plugins/goto/admin/systems/goto/Device/class_DeviceConfig.inc
index a9a706c2cc0133bacf5ee7b7f9b6ccf1b13cc6e9..242d8a487fb0cae37a15a9a987a93ec143003612 100644 (file)
$this->assignableElementsList->setHeight("200px");
$this->assignableElementsList->setHeader(array(_("Name"),_("Description"),_("Add")));
$this->assignableElementsList->setColspecs(array('*','*','20'));
- $this->assignableElementsList->setAcl('rwcdm');
+ $this->assignableElementsList->setAcl($this->getacl(''));
// Create used Elements list.
$this->usedElementsList = new sortableListing();
$this->usedElementsList->setHeight("200px");
$this->usedElementsList->setHeader(array(_("Name"), _("Description"), _("Remove")));
$this->usedElementsList->setColspecs(array('*','*','20'));
- $this->usedElementsList->setAcl('rwcdm');
+ $this->usedElementsList->setAcl($this->getacl(''));
// Create parameter Elements list.
$this->parameterList = new sortableListing();
$this->parameterList->setHeight("200px");
$this->parameterList->setHeader(array(_("Name"), _("Description"), _("Value")));
$this->parameterList->setColspecs(array('*','*','350px'));
- $this->parameterList->setAcl('rwcdm');
+ $this->parameterList->setAcl($this->getacl(''));
}
*/
function execute()
{
-
// Initialize to plugin
if(!$this->initialized){
if(!isset($this->parameterWidgets[$param])){
$this->parameterWidgets[$param] = new TemplateWidget_stringLong($this->config, $param, $value,
$desc, '', FALSE, 'string', $param);
+
+ $this->parameterWidgets[$param]->setWriteable(preg_match("/w/",$this->getacl('')));
+ $this->parameterWidgets[$param]->setReadable(preg_match("/r/",$this->getacl('')));
}
$w = $this->parameterWidgets[$param];
$lData[$param] = array('data' => array($w->getDisplayName(),$desc, $w->render()));
{
// Get posted parameter values
foreach($this->parameterWidgets as $name => $w){
- $w->save_object();
- $this->parameterValues[$name] = $w->getValue();
+ if($w->isWriteable()){
+ $w->save_object();
+ $this->parameterValues[$name] = $w->getValue();
+ }
}
- // Act on Add-Element actions
- $this->assignableElementsList->save_object();
- $action = $this->assignableElementsList->getAction();
- if($action['action'] == 'edit'){
- $this->usedElements[] = $this->assignableElementsList->getKey($action['targets'][0]);
- $this->usedElements = array_unique($this->usedElements);
- }
+ if(preg_match("/w/", $this->getacl(''))){
- // Act on Remove-Item actions
- $this->usedElementsList->save_object();
- $action = $this->usedElementsList->getAction();
- if($action['action'] == 'delete'){
- $name = $this->usedElementsList->getKey($action['targets'][0]);
- $this->usedElements = array_remove_entries_ics(array($name), $this->usedElements);
+ // Act on Add-Element actions
+ $this->assignableElementsList->save_object();
+ $action = $this->assignableElementsList->getAction();
+ if($action['action'] == 'edit'){
+ $this->usedElements[] = $this->assignableElementsList->getKey($action['targets'][0]);
+ $this->usedElements = array_unique($this->usedElements);
+ }
+
+ // Act on Remove-Item actions
+ $this->usedElementsList->save_object();
+ $action = $this->usedElementsList->getAction();
+ if($action['action'] == 'delete'){
+ $name = $this->usedElementsList->getKey($action['targets'][0]);
+ $this->usedElements = array_remove_entries_ics(array($name), $this->usedElements);
+ }
}
}
diff --git a/gosa-plugins/goto/admin/systems/goto/Device/class_InstallRecipe.inc b/gosa-plugins/goto/admin/systems/goto/Device/class_InstallRecipe.inc
index d7694e6f68a50370b3e77263425a5fb4891f140b..211e33ccda4149ce7bf56b9b4a5e03fd864cd352 100644 (file)
plugin::execute();
$smarty = get_smarty();
- $smarty->assign('installTemplateList', $this->installationTemplateNames);
- $smarty->assign('installReleaseList', $this->templateToRelease[$this->installTemplate]);
+ // Assign ACLs
+ foreach($this->attributes as $attr){
+ $smarty->assign("{$attr}ACL", $this->getacl($attr));
+ }
+ $smarty->assign('installTemplateList', $this->installationTemplateNames);
+ $smarty->assign('installReleaseList', $this->templateToRelease[$this->installTemplate]);
$smarty->assign('timezones', $this->timezones);
$smarty->assign('installKeyboardlayoutList', $this->installKeyboardlayoutList);
$smarty->assign('installKernelPackageList', $this->installKernelPackageList);
"plSection" => array("administration"),
"plCategory" => array("Device"),
"plProvidedAcls" => array(
- "member" => _("Member"),
- "installTemplate" => _("Installation template"),
- "installRelease" => _("Installation release"),
- "installBootstrapMethod" => _("Bootstrap method"),
- "installConfigManagement" => _("Config management"),
+ "installRelease" => _("Release"),
+ "installTemplate" => _("Template"),
"installKeyboardlayout" => _("Keyboard layout"),
- "installSystemLocale" => _("System locale"),
+ "installSystemLocale" => _("Locale"),
"installTimezone" => _("Timezone"),
- "installTimeUTC" => _("Time"),
- "installNTPServer" => _("NTP-Server"),
+ "installTimeUTC" => _("Utc"),
+ "installNTPServer" => _("Ntp server"),
"installMirror" => _("Mirror"),
"installRootEnabled" => _("Root login enabled"),
"installRootPasswordHash" => _("Root password hash"),
"installKernelPackage" => _("Kernel package"),
+ "installConfigManagement" => _("Config mangement"),
+ "installBootstrapMethod" => _("Bootstrap method"),
"installPartitionTable" => _("Partition table")
)
)