diff --git a/src/main/java/com/rekoe/module/admin/AdminProjectAct.java b/src/main/java/com/rekoe/module/admin/AdminProjectAct.java index 23b4a6d..54d0031 100644 --- a/src/main/java/com/rekoe/module/admin/AdminProjectAct.java +++ b/src/main/java/com/rekoe/module/admin/AdminProjectAct.java @@ -121,6 +121,9 @@ public class AdminProjectAct extends BaseAction { @RequiresPermissions({ "svn.project:edit" }) public Message init(@Param("pj") String pj, HttpServletRequest req) { Pj project = projectService.get(pj); + if (project.isInitTempl()) { + return Message.success("ok", req); + } boolean isRight = repositoryService.createDir(project); if (isRight) { return Message.success("ok", req); diff --git a/src/main/java/com/rekoe/module/admin/AdminProjectGroupUsrAct.java b/src/main/java/com/rekoe/module/admin/AdminProjectGroupUsrAct.java index 127a49f..6638648 100644 --- a/src/main/java/com/rekoe/module/admin/AdminProjectGroupUsrAct.java +++ b/src/main/java/com/rekoe/module/admin/AdminProjectGroupUsrAct.java @@ -82,6 +82,7 @@ public class AdminProjectGroupUsrAct extends BaseAction { @PermissionTag(name = "删除项目组用户", tag = "SVN账号管理", enable = true) public Message delete(@Param("pj") String pj, @Param("gr") String gr, @Param("usr") String usr, HttpServletRequest req) { projectGroupUsrService.delete(pj, gr, usr); + svnService.exportConfig(pj); return Message.success("ok", req); } } diff --git a/src/main/java/com/rekoe/service/ProjectGroupService.java b/src/main/java/com/rekoe/service/ProjectGroupService.java index cf03477..d1727ab 100644 --- a/src/main/java/com/rekoe/service/ProjectGroupService.java +++ b/src/main/java/com/rekoe/service/ProjectGroupService.java @@ -88,7 +88,7 @@ public class ProjectGroupService extends BaseService { * 组 */ public void delete(String pj, String gr) { - Sql sql = Sqls.create("delete from pj_gr");// where pj = ? and gr=?"; + Sql sql = Sqls.create("delete from pj_gr $condition");// where pj = ? and gr=?"; sql.setCondition(Cnd.where("pj", "=", pj).and("gr", "=", gr)); dao().execute(sql); } diff --git a/src/main/webapp/WEB-INF/template/admin/project/list.ftl b/src/main/webapp/WEB-INF/template/admin/project/list.ftl index 8fbb798..0e8dced 100644 --- a/src/main/webapp/WEB-INF/template/admin/project/list.ftl +++ b/src/main/webapp/WEB-INF/template/admin/project/list.ftl @@ -55,7 +55,7 @@ function init(pj){ <@p.column title="设置用户组" align="center">设置用户组<#t/> <@p.column title="设置权限" align="center">设置权限<#t/> - <@p.column title="初始化" align="center">初始化<#t/> + <@p.column title="初始化" align="center">初始化<#t/> <@shiro.hasPermission name="svn.project:auth.manager"> <@p.column title="编辑" align="center"> 删除<#rt/> diff --git a/src/main/webapp/WEB-INF/template/admin/project_group_usr/add.ftl b/src/main/webapp/WEB-INF/template/admin/project_group_usr/add.ftl index a7367f1..7f76cb2 100644 --- a/src/main/webapp/WEB-INF/template/admin/project_group_usr/add.ftl +++ b/src/main/webapp/WEB-INF/template/admin/project_group_usr/add.ftl @@ -64,7 +64,7 @@ function checkForm(f){ $.message(message); if (message.type == "success") { - window.location.href = "list.rk" + window.location.href = "list.rk?pj=${pj}&gr=${gr}" } } }); diff --git a/src/main/webapp/WEB-INF/template/admin/project_group_usr/list.ftl b/src/main/webapp/WEB-INF/template/admin/project_group_usr/list.ftl index f64fc7e..fb568a6 100644 --- a/src/main/webapp/WEB-INF/template/admin/project_group_usr/list.ftl +++ b/src/main/webapp/WEB-INF/template/admin/project_group_usr/list.ftl @@ -56,7 +56,7 @@ function deleted(pj,gr,usr){ <@p.column title="姓名" align="center">${group.usrName}<#t/> <@shiro.hasPermission name="project.group:delete"> <@p.column title="删除" align="center"> - <#if group.gr != "manager">删除<#rt/> + 删除<#rt/> <#t/>