mirror of https://github.com/Rekoe/rk_svnadmin
fix
parent
1f9fdd8bd3
commit
8f112f4b21
|
@ -228,7 +228,7 @@ public class AdminProjectAct extends BaseAction {
|
|||
PjAuth entity = new PjAuth();
|
||||
entity.setPj(pj);
|
||||
entity.setRes(res);
|
||||
Mvcs.getReq().setAttribute("entity", entity);
|
||||
entity.setRw(rw);
|
||||
projectAuthService.save(pj, res, rw, grs, usrs);
|
||||
return pjauth(pj, res, entity, Mvcs.getReq());
|
||||
}
|
||||
|
|
|
@ -245,9 +245,11 @@ public class ProjectAuthService extends BaseService<PjAuth> {
|
|||
*/
|
||||
public void saveByUsr(PjAuth pjAuth) {
|
||||
if (this.getByUsr(pjAuth.getPj(), pjAuth.getUsr(), pjAuth.getRes()) == null) {
|
||||
dao().insert(pjAuth);
|
||||
Sql sql = Sqls.create("insert into pj_usr_auth (pj,usr,res,rw) values (@pj,@usr,@res,@rw)");
|
||||
sql.setParam("pj", pjAuth.getPj()).setParam("usr", pjAuth.getUsr()).setParam("rw", pjAuth.getRw()).setParam("res", pjAuth.getRes());
|
||||
dao().execute(sql);
|
||||
} else {
|
||||
dao().update(getEntityClass(), Chain.make("rw", pjAuth.getRw()), Cnd.where("pj", "=", pjAuth.getPj()).and("usr", "=", pjAuth.getUsr()).and("res", "=", pjAuth.getRes()));
|
||||
dao().update("pj_usr_auth", Chain.make("rw", pjAuth.getRw()), Cnd.where("pj", "=", pjAuth.getPj()).and("usr", "=", pjAuth.getUsr()).and("res", "=", pjAuth.getRes()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ public class ProjectConfigService extends BaseService<ProjectConfig> {
|
|||
public String getProjectUrl(String pj) {
|
||||
ProjectConfig conf = get();
|
||||
String path = conf.getDomainPath();
|
||||
if (!StringUtils.endsWith(path, "/") || !StringUtils.endsWith(path, "\\")) {
|
||||
if (!StringUtils.endsWith(path, "/")) {
|
||||
path += "/";
|
||||
}
|
||||
return path + pj;
|
||||
|
|
|
@ -183,7 +183,7 @@ Cms.deleted = function(id){
|
|||
$.message(message);
|
||||
if (message.type == "success")
|
||||
{
|
||||
window.location.href = back;
|
||||
window.location.href = list.rk;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue