mirror of https://github.com/Rekoe/rk_svnadmin
fix
parent
57ef83c7eb
commit
d8c7cda742
|
@ -28,7 +28,7 @@ public class AdminProjectGroupAct extends BaseAction {
|
|||
@Ok("fm:template.admin.project_group.list")
|
||||
@RequiresPermissions({ "project.group:view" })
|
||||
@PermissionTag(name = "SVN浏览账号", tag = "SVN账号管理")
|
||||
public Pagination list(@Param(value = "pageNumber", df = "1") int page, @Param("pj") String pj) {
|
||||
public Pagination list(@Param(value = "pageNumber", df = "1") Integer page, @Param("pj") String pj) {
|
||||
return projectGroupService.getObjListByPager(page, 20, Cnd.where("pj", "=", pj));
|
||||
}
|
||||
|
||||
|
|
|
@ -346,8 +346,8 @@ public class ProjectAuthService extends BaseService<PjAuth> {
|
|||
* @return 具有相同svn root的项目资源的权限列表
|
||||
*/
|
||||
public List<PjAuth> getListByRootPath(String rootPath) {
|
||||
Sql sql = Sqls.create("select pj,res,rw,gr,' ' usr,' ' usrname from pj_gr_auth where pj in (select distinct pj from pj where type=@type and path like @like) " + " UNION " + " select a.pj,a.res,a.rw,' ' gr,a.usr,b.name usrname from pj_usr_auth a left join usr b on (a.usr=b.usr) where a.pj in (select distinct pj from pj where type=@type and path like @like) " + " order by res,gr,usr");
|
||||
sql.setParam("type", Constants.HTTP_MUTIL).setParam("like", rootPath + "%");
|
||||
Sql sql = Sqls.create("select pj,res,rw,gr,' ' usr,' ' usrname from pj_gr_auth where pj in (select distinct pj from pj where type=@type) " + " UNION " + " select a.pj,a.res,a.rw,' ' gr,a.usr,b.name usrname from pj_usr_auth a left join usr b on (a.usr=b.usr) where a.pj in (select distinct pj from pj where type=@type) " + " order by res,gr,usr");
|
||||
sql.setParam("type", Constants.HTTP_MUTIL);
|
||||
final List<PjAuth> list = new ArrayList<PjAuth>();
|
||||
sql.setCallback(new SqlCallback() {
|
||||
|
||||
|
|
|
@ -113,8 +113,8 @@ public class ProjectGroupUsrService extends BaseService<PjGrUsr> {
|
|||
* @return 有相同的svn root的项目组用户
|
||||
*/
|
||||
public List<PjGrUsr> getListByRootPath(String rootPath) {
|
||||
Sql sql = Sqls.create("select a.pj,a.gr,b.usr,c.name as usrname from pj_gr a left join pj_gr_usr b on (a.pj=b.pj and a.gr=b.gr) left join usr c on (b.usr=c.usr) " + " where a.pj in (select distinct pj from pj where type=@type and path like @like) order by a.pj,a.gr,b.usr");
|
||||
sql.setParam("type", Constants.HTTP_MUTIL).setParam("like", rootPath + "%");
|
||||
Sql sql = Sqls.create("select a.pj,a.gr,b.usr,c.name as usrname from pj_gr a left join pj_gr_usr b on (a.pj=b.pj and a.gr=b.gr) left join usr c on (b.usr=c.usr) " + " where a.pj in (select distinct pj from pj where type=@type) order by a.pj,a.gr,b.usr");
|
||||
sql.setParam("type", Constants.HTTP_MUTIL);
|
||||
final List<PjGrUsr> list = new ArrayList<PjGrUsr>();
|
||||
sql.setCallback(new SqlCallback() {
|
||||
|
||||
|
|
|
@ -146,7 +146,7 @@ public class ProjectService extends BaseService<Pj> {
|
|||
projectGroupService.deletePj(pj);
|
||||
projectUserService.deletePj(pj);
|
||||
svnService.exportConfig(pj);
|
||||
delete(pj);
|
||||
dao().clear(getEntityClass(), Cnd.where("pj", "=", pj));
|
||||
}
|
||||
|
||||
public void update(Pj pj) {
|
||||
|
|
|
@ -21,6 +21,9 @@ public class SvnUserService extends BaseService<Usr> {
|
|||
|
||||
private final String REGEX_USERNAME = "^[a-zA-Z0-9]{1,16}$";
|
||||
|
||||
public SvnUserService() {
|
||||
}
|
||||
|
||||
public SvnUserService(Dao dao) {
|
||||
super(dao);
|
||||
}
|
||||
|
|
|
@ -67,8 +67,8 @@ public class UsrService extends BaseService<Usr> {
|
|||
}
|
||||
|
||||
public List<Usr> getListByRootPath(String rootPath) {
|
||||
Sql sql = Sqls.create("select p.usr,p.name,p.role,CASE WHEN pu.psw IS NOT NULL THEN pu.psw ELSE p.psw END psw from (" + " select a.usr,a.role,a.psw,a.name from usr a " + " where " + " exists (select d.usr from pj_gr_usr d where d.usr=a.usr and d.pj in (select distinct pj from pj where type=@type and path like @like)) " + " or exists(select c.usr from pj_usr_auth c where a.usr=c.usr and c.pj in (select distinct pj from pj where type=@type and path like @like)) " + " ) p " + " left join pj_usr pu on (p.usr=pu.usr) where p.usr <> '*'" + " order by p.usr ");
|
||||
sql.setParam("like", rootPath + "%").setParam("type", com.rekoe.utils.Constants.HTTP_MUTIL);
|
||||
Sql sql = Sqls.create("select p.usr,p.name,p.role,CASE WHEN pu.psw IS NOT NULL THEN pu.psw ELSE p.psw END psw from (" + " select a.usr,a.role,a.psw,a.name from usr a " + " where " + " exists (select d.usr from pj_gr_usr d where d.usr=a.usr and d.pj in (select distinct pj from pj where type=@type)) " + " or exists(select c.usr from pj_usr_auth c where a.usr=c.usr and c.pj in (select distinct pj from pj where type=@type)) " + " ) p " + " left join pj_usr pu on (p.usr=pu.usr) where p.usr <> '*'" + " order by p.usr ");
|
||||
sql.setParam("type", com.rekoe.utils.Constants.HTTP_MUTIL);
|
||||
final List<Usr> list = new ArrayList<Usr>();
|
||||
sql.setCallback(new SqlCallback() {
|
||||
|
||||
|
|
Loading…
Reference in New Issue