use of app.hongs.serv.auth.RoleMap in project HongsCORE by ihongs.
the class DeptAction method getInfo.
@Action("info")
public void getInfo(ActionHelper helper) throws HongsException {
Map rd = helper.getRequestData();
String id = helper.getParameter("id");
String nc = helper.getParameter("navi-conf");
String ud = (String) helper.getSessibute(Cnst.UID_SES);
if (id != null && id.length() != 0) {
rd = model.getInfo(rd);
} else {
rd = new HashMap();
}
// With all roles
if (nc != null && nc.length() != 0) {
List rs = !Cnst.ADM_UID.equals(ud) ? new RoleMap(NaviMap.getInstance(nc)).getRoleTranslated() : new RoleMap(NaviMap.getInstance(nc)).getRoleTranslates();
Dict.put(rd, rs, "enum", "roles..role");
}
helper.reply(rd);
}
use of app.hongs.serv.auth.RoleMap in project HongsCORE by ihongs.
the class UserAction method getInfo.
@Action("info")
public void getInfo(ActionHelper helper) throws HongsException {
Map rd = helper.getRequestData();
String id = helper.getParameter("id");
String nc = helper.getParameter("navi-conf");
String ud = (String) helper.getSessibute(Cnst.UID_SES);
if (id != null && id.length() != 0) {
rd = model.getInfo(rd);
} else {
rd = new HashMap();
}
// With all roles
if (nc != null && nc.length() != 0) {
List rs = !Cnst.ADM_UID.equals(ud) ? new RoleMap(NaviMap.getInstance(nc)).getRoleTranslated() : new RoleMap(NaviMap.getInstance(nc)).getRoleTranslates();
Dict.put(rd, rs, "enum", "roles..role");
}
// Remove the password field, don't show password in page
Map info = (Map) rd.get("info");
if (info != null) {
info.remove("password");
info.remove("passcode");
}
helper.reply(rd);
}