summaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2011-08-16 16:30:01 -0500
committerEndi S. Dewata <edewata@redhat.com>2011-08-17 18:04:31 +0000
commit7793cbb482483df93acd813ed25246da71512c99 (patch)
tree201c21af44f05bc71b9728074468bd39d09c71e9 /install
parent55b364f67cfb26e524a245b6e1c33c3913db3dde (diff)
downloadfreeipa-7793cbb482483df93acd813ed25246da71512c99.zip
freeipa-7793cbb482483df93acd813ed25246da71512c99.tar.gz
freeipa-7793cbb482483df93acd813ed25246da71512c99.tar.xz
Hide activation/deactivation link from regular users.
The IPA.user_status_widget has been modified to show/hide the link for activating/deactivating users according to the attributelevelrights. Ticket #1625
Diffstat (limited to 'install')
-rw-r--r--install/ui/user.js15
1 files changed, 13 insertions, 2 deletions
diff --git a/install/ui/user.js b/install/ui/user.js
index 7247035..baca334 100644
--- a/install/ui/user.js
+++ b/install/ui/user.js
@@ -166,7 +166,11 @@ IPA.user_status_widget = function(spec) {
name: 'status'
}).appendTo(container);
- container.append(': ');
+ that.link_span = $('<span/>', {
+ name: 'link'
+ }).appendTo(container);
+
+ that.link_span.append(': ');
that.status_link = $('<a/>', {
name: 'link',
@@ -191,7 +195,7 @@ IPA.user_status_widget = function(spec) {
return false;
}
- }).appendTo(container);
+ }).appendTo(that.link_span);
};
that.update = function() {
@@ -231,6 +235,13 @@ IPA.user_status_widget = function(spec) {
message = message.replace('${action}', action_label);
that.status_link.html(message);
+
+ if (that.writable) {
+ that.link_span.css('display', '');
+
+ } else {
+ that.link_span.css('display', 'none');
+ }
};
that.show_activation_dialog = function() {