mirror of https://github.com/Rekoe/rk_svnadmin
fix
parent
5dab4e20dc
commit
59c276d630
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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/>
|
||||
|
|
|
@ -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}"
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue