Implement a user::is_writable() API method and disable the user add, updates and display if the Identity driver does not support writes. This is set in the config.identity.php

This commit is contained in:
Tim Almdal
2009-10-07 21:40:05 -07:00
parent b3211cb2a8
commit 03d0311618
9 changed files with 75 additions and 25 deletions
@@ -4,7 +4,7 @@
<? if (!$group->special): ?>
<a href="<?= url::site("admin/users/delete_group_form/$group->id") ?>"
title="<?= t("Delete the %name group", array("name" => $group->name))->for_html_attr() ?>"
class="g-dialog-link g-button ui-state-default ui-corner-all">
class="g-dialog-link g-button ui-state-default ui-corner-all <?= !empty($writable) ? "" : "ui-state-disabled" ?>">
<span class="ui-icon ui-icon-trash"><?= t("delete") ?></span></a>
<? else: ?>
<a title="<?= t("This default group cannot be deleted")->for_html_attr() ?>"
@@ -20,7 +20,7 @@
<?= html::clean($user->name) ?>
<? if (!$group->special): ?>
<a href="javascript:remove_user(<?= $user->id ?>, <?= $group->id ?>)"
class="g-button ui-state-default ui-corner-all ui-icon-left"
class="g-button ui-state-default ui-corner-all ui-icon-left <?= !empty($writable) ? "" : "ui-state-disabled" ?>"
title="<?= t("Remove %user from %group group",
array("user" => $user->name, "group" => $group->name))->for_html_attr() ?>">
<span class="ui-icon ui-icon-closethick"><?= t("remove") ?></span>