mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Whoami link
The 'logged in as' message in the header into an active hypoerlink that loads the details page for the current user.
Also fixed a bug where, when reloading, the search page would fail due to scl being undefined.
Fixed a typo
replaced {'user-facet':'details', 'pkey':whoami_pkey},2);
with {'user-facet':'details', 'user-pkey':whoami_pkey},2);
This commit is contained in:
@@ -37,7 +37,7 @@ var admin_tabs_lists = [
|
||||
];
|
||||
|
||||
|
||||
var self_serv_tabs_lists =
|
||||
var self_serv_tabs_lists =
|
||||
[
|
||||
['identity', 'IDENTITY', [
|
||||
['user', 'Users', ipa_entity_setup]]]];
|
||||
@@ -47,11 +47,16 @@ var nav_tabs_lists;
|
||||
/* main (document onready event handler) */
|
||||
$(function() {
|
||||
|
||||
var whoami_pkey;
|
||||
|
||||
function whoami_on_win(data, text_status, xhr) {
|
||||
$(window).bind('hashchange', window_hashchange);
|
||||
if (!data.error){
|
||||
var whoami = data.result.result[0];
|
||||
whoami_pkey=whoami.uid[0];
|
||||
$('#loggedinas').find('strong').text(whoami.krbprincipalname[0]);
|
||||
$('#loggedinas a').fragment(
|
||||
{'user-facet':'details', 'user-pkey':whoami_pkey},2);
|
||||
if (whoami.hasOwnProperty('memberof_rolegroup') &&
|
||||
whoami.memberof_rolegroup.length > 0){
|
||||
nav_tabs_lists = admin_tabs_lists;
|
||||
@@ -59,7 +64,7 @@ $(function() {
|
||||
}else{
|
||||
nav_tabs_lists = self_serv_tabs_lists;
|
||||
|
||||
var state = {'user-pkey': whoami.uid[0],
|
||||
var state = {'user-pkey':whoami_pkey ,
|
||||
'user-facet': jQuery.bbq.getState('user-facet') ||
|
||||
'details'};
|
||||
$.bbq.pushState(state);
|
||||
|
||||
Reference in New Issue
Block a user