mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
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
This commit is contained in:
parent
72a7e3ac2d
commit
0ec6b4fe1f
@ -166,7 +166,11 @@ IPA.user_status_widget = function(spec) {
|
|||||||
name: 'status'
|
name: 'status'
|
||||||
}).appendTo(container);
|
}).appendTo(container);
|
||||||
|
|
||||||
container.append(': ');
|
that.link_span = $('<span/>', {
|
||||||
|
name: 'link'
|
||||||
|
}).appendTo(container);
|
||||||
|
|
||||||
|
that.link_span.append(': ');
|
||||||
|
|
||||||
that.status_link = $('<a/>', {
|
that.status_link = $('<a/>', {
|
||||||
name: 'link',
|
name: 'link',
|
||||||
@ -191,7 +195,7 @@ IPA.user_status_widget = function(spec) {
|
|||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}).appendTo(container);
|
}).appendTo(that.link_span);
|
||||||
};
|
};
|
||||||
|
|
||||||
that.update = function() {
|
that.update = function() {
|
||||||
@ -231,6 +235,13 @@ IPA.user_status_widget = function(spec) {
|
|||||||
message = message.replace('${action}', action_label);
|
message = message.replace('${action}', action_label);
|
||||||
|
|
||||||
that.status_link.html(message);
|
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() {
|
that.show_activation_dialog = function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user