pull/3/head
rekoe 2016-04-27 17:21:39 +08:00
parent 5dab4e20dc
commit 59c276d630
6 changed files with 8 additions and 4 deletions

View File

@ -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);

View File

@ -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);
}
}

View File

@ -88,7 +88,7 @@ public class ProjectGroupService extends BaseService<PjGr> {
*
*/
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);
}

View File

@ -55,7 +55,7 @@ function init(pj){
<@p.column title="设置用户组" align="center"><a href="${base}/admin/project/group/list?pj=${project.pj}">设置用户组</a></@p.column><#t/>
</@shiro.hasPermission>
<@p.column title="设置权限" align="center"><a href="rep?pj=${project.pj}">设置权限</a></@p.column><#t/>
<@p.column title="初始化" align="center"><a href="init?pj=${project.pj}">初始化</a></@p.column><#t/>
<@p.column title="初始化" align="center"><a href="onclick="javascript:void(0);" init('${project.pj}')">初始化</a></@p.column><#t/>
<@shiro.hasPermission name="svn.project:auth.manager">
<@p.column title="编辑" align="center">
<a href="javascript:void(0);" onclick="Cms.deleted('${project.pj}')" class="pn-opt">删除</a><#rt/>

View File

@ -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}"
}
}
});

View File

@ -56,7 +56,7 @@ function deleted(pj,gr,usr){
<@p.column title="姓名" align="center">${group.usrName}</@p.column><#t/>
<@shiro.hasPermission name="project.group:delete">
<@p.column title="删除" align="center">
<#if group.gr != "manager"><a href="javascript:void(0);" onclick="deleted('${group.pj}','${group.gr}')" class="pn-opt">删除</a></#if><#rt/>
<a href="javascript:void(0);" onclick="deleted('${group.pj}','${group.gr}')" class="pn-opt">删除</a><#rt/>
</@p.column><#t/>
</@shiro.hasPermission>
</@p.table>