|
@@ -286,17 +286,28 @@ define([
|
|
|
username: user
|
|
|
}
|
|
|
}).then(function (response) {
|
|
|
- if (lang.exists("UserEditResponse.Groups.Group", response)) {
|
|
|
- arrayUtil.some(response.UserEditResponse.Groups.Group, function (item, idx) {
|
|
|
- if (item.name === "Administrators" || item.name === "Directory Administrators") {
|
|
|
- dojoConfig.isAdmin = true;
|
|
|
- registry.byId(context.id + "SetBanner").set("disabled", false);
|
|
|
- if (context.widget._OPS.refresh) {
|
|
|
- context.widget._OPS.refresh();
|
|
|
- }
|
|
|
- return false;
|
|
|
+ if (lang.exists("UserEditResponse.isLDAPAdmin", response)) {
|
|
|
+ if (response.UserEditResponse.isLDAPAdmin === true){
|
|
|
+ dojoConfig.isAdmin = true;
|
|
|
+ registry.byId(context.id + "SetBanner").set("disabled", false);
|
|
|
+ if (context.widget._OPS.refresh) {
|
|
|
+ context.widget._OPS.refresh();
|
|
|
+ }
|
|
|
+ return false;
|
|
|
}
|
|
|
- });
|
|
|
+ } else {
|
|
|
+ if (lang.exists("UserEditResponse.Groups.Group", response)){
|
|
|
+ arrayUtil.some(response.UserEditResponse.Groups.Group, function (item, idx) {
|
|
|
+ if (item.name === "Administrators" || item.name === "Directory Administrators") {
|
|
|
+ dojoConfig.isAdmin = true;
|
|
|
+ registry.byId(context.id + "SetBanner").set("disabled", false);
|
|
|
+ if (context.widget._OPS.refresh) {
|
|
|
+ context.widget._OPS.refresh();
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
}
|