添加账号 权限

pull/3/head
rekoe 2016-03-27 18:10:52 +08:00
parent 8f112f4b21
commit ca7eb105a3
1 changed files with 10 additions and 2 deletions

View File

@ -90,18 +90,26 @@ public class ProjectService extends BaseService<Pj> {
pjGr.setDes(gr);
projectGroupService.save(pjGr);
}
//
String res = this.projectAuthService.formatRes(pj, "/");
PjAuth pjAuthDef = new PjAuth();
pjAuthDef.setPj(pj.getPj());
pjAuthDef.setRes(res);
pjAuthDef.setRw("rw");
pjAuthDef.setUsr("admin");
projectAuthService.saveByUsr(pjAuthDef);
// 增加默认的权限 @see Issue 29
PjAuth pjAuth = new PjAuth();
pjAuth.setPj(pj.getPj());
pjAuth.setRes(this.projectAuthService.formatRes(pj, "/"));
pjAuth.setRes(res);
pjAuth.setRw("rw");
pjAuth.setGr(Constants.GROUP_MANAGER);
projectAuthService.saveByGr(pjAuth);
repositoryService.createDir(pj);
} else {
dao().update(pj);
}
svnService.exportConfig(pj.getPj());
repositoryService.createDir(pj);
}
/**