pull/3/head
rekoe 9 years ago
parent 9a9a4a2d43
commit 38d8857138

@ -136,6 +136,8 @@ public class AdminProjectAct extends BaseAction {
} else {
res = entity.getRes();
}
String root = projectConfigService.get().getRepositoryPath()+"/";
res = StringUtils.remove(res, root);
entity.setRes(res);
List<PjAuth> list = projectAuthService.list(pj, res);
req.setAttribute("list", list);

@ -261,7 +261,7 @@ public class ProjectAuthService extends BaseService<PjAuth> {
* @return
*/
public PjAuth getByGr(String pj, String gr, String res) {
Sql sql = Sqls.create("select pj,res,rw,gr,' ' usr,' ' usrname from pj_gr_auth");
Sql sql = Sqls.create("select pj,res,rw,gr,' ' usr,' ' usrname from pj_gr_auth $condition");
sql.setCondition(Cnd.where("pj", "=", pj).and("gr", "=", gr).and("res", "=", res));
sql.setCallback(new SqlCallback() {

@ -70,6 +70,7 @@ public class ProjectService extends BaseService<Pj> {
* @param pj
*
*/
@Aop(TransAop.READ_COMMITTED)
public void save(Pj pj) {
// 是否可以增加项目
boolean insert = nameOk(pj.getPj());
@ -116,7 +117,7 @@ public class ProjectService extends BaseService<Pj> {
if (p == null) {
return pj;
}
return projectConfigService.getRepoPath(p);
return pj;
}
/**
@ -128,7 +129,7 @@ public class ProjectService extends BaseService<Pj> {
* @since 3.0.3
*/
public String getRelateRootPath(Pj pj) {
return projectConfigService.getRepoPath(pj);
return pj.getPj();
}
@Inject

Loading…
Cancel
Save