hide password button in readOnly mode

This commit is contained in:
Roland Gruber 2010-10-16 12:39:26 +00:00
parent bf9c6ffb01
commit d93198bd18
2 changed files with 2 additions and 2 deletions

View File

@ -1002,7 +1002,7 @@ class posixAccount extends baseModule implements passwordService {
$return->addElement(new htmlTableExtendedSelect('loginShell', $shelllist, array($this->attributes['loginShell'][0]), _('Login shell'), 'loginShell'), true);
}
// password buttons
if (isset($this->attributes['userPassword'][0])) {
if (checkIfWriteAccessIsAllowed() && isset($this->attributes['userPassword'][0])) {
$return->addElement(new htmlOutputText(_('Password')));
$pwdContainer = new htmlTable();
if (pwd_is_enabled($this->attributes['userPassword'][0])) {

View File

@ -196,7 +196,7 @@ class posixGroup extends baseModule implements passwordService {
$return->addElement(new htmlAccountPageButton(get_class($this), 'user', 'open', _('Edit members')));
$return->addElement(new htmlHelpLink('members'), true);
// password buttons
if (isset($this->attributes['userPassword'][0])) {
if (checkIfWriteAccessIsAllowed() && isset($this->attributes['userPassword'][0])) {
$return->addElement(new htmlOutputText(_('Password')));
$pwdContainer = new htmlTable();
if (pwd_is_enabled($this->attributes['userPassword'][0])) {