pull/3/head
rekoe 2016-03-27 16:12:38 +08:00
parent 9a9a4a2d43
commit 38d8857138
3 changed files with 6 additions and 3 deletions

View File

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

View File

@ -261,7 +261,7 @@ public class ProjectAuthService extends BaseService<PjAuth> {
* @return * @return
*/ */
public PjAuth getByGr(String pj, String gr, String res) { 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.setCondition(Cnd.where("pj", "=", pj).and("gr", "=", gr).and("res", "=", res));
sql.setCallback(new SqlCallback() { sql.setCallback(new SqlCallback() {

View File

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