mirror of https://github.com/Rekoe/rk_svnadmin
fix
parent
38d8857138
commit
1f9fdd8bd3
|
@ -119,8 +119,7 @@ public class AdminProjectAct extends BaseAction {
|
||||||
@At
|
@At
|
||||||
@Ok("fm:template.admin.project.pjauth")
|
@Ok("fm:template.admin.project.pjauth")
|
||||||
@RequiresPermissions({ "svn.project:view" })
|
@RequiresPermissions({ "svn.project:view" })
|
||||||
public String pjauth(@Param("pj") String pj, @Param("res") String res, HttpServletRequest req) {
|
public String pjauth(@Param("pj") String pj, @Param("res") String res, @Param("entity") PjAuth entity, HttpServletRequest req) {
|
||||||
PjAuth entity = (PjAuth) req.getAttribute("entity");
|
|
||||||
if (entity == null) {
|
if (entity == null) {
|
||||||
entity = new PjAuth();
|
entity = new PjAuth();
|
||||||
entity.setPj(pj);
|
entity.setPj(pj);
|
||||||
|
@ -186,7 +185,7 @@ public class AdminProjectAct extends BaseAction {
|
||||||
} else if (StringUtils.isNotBlank(usr)) {
|
} else if (StringUtils.isNotBlank(usr)) {
|
||||||
projectAuthService.deleteByUsr(pj, usr, res);
|
projectAuthService.deleteByUsr(pj, usr, res);
|
||||||
}
|
}
|
||||||
return pjauth(pj, res, Mvcs.getReq());
|
return pjauth(pj, res, null, Mvcs.getReq());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
|
@ -221,4 +220,16 @@ public class AdminProjectAct extends BaseAction {
|
||||||
return Message.success("ok", req);
|
return Message.success("ok", req);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@At("/pjauth/save")
|
||||||
|
@Ok("fm:template.admin.project.pjauth")
|
||||||
|
@RequiresPermissions({ "svn.project:auth.manager" })
|
||||||
|
@PermissionTag(name = "管理项目权限", tag = "SVN项目管理", enable = false)
|
||||||
|
public String pjauth_save(@Param("rw") String rw, @Param("grs") String[] grs, @Param("pj") String pj, @Param("res") String res, @Param("usrs") String[] usrs) {
|
||||||
|
PjAuth entity = new PjAuth();
|
||||||
|
entity.setPj(pj);
|
||||||
|
entity.setRes(res);
|
||||||
|
Mvcs.getReq().setAttribute("entity", entity);
|
||||||
|
projectAuthService.save(pj, res, rw, grs, usrs);
|
||||||
|
return pjauth(pj, res, entity, Mvcs.getReq());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,8 +86,7 @@
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body style="margin: 0px;">
|
<body style="margin: 0px;">
|
||||||
<form name="pjauth" action="pjauth" method="post" onsubmit="return checkForm(this);">
|
<form name="pjauth" action="pjauth/save" method="post" onsubmit="return checkForm(this);">
|
||||||
<input type="hidden" name="act" value="save">
|
|
||||||
<input type="hidden" name="pj" value="${pj}">
|
<input type="hidden" name="pj" value="${pj}">
|
||||||
<table class="table table-striped table-bordered">
|
<table class="table table-striped table-bordered">
|
||||||
<tr>
|
<tr>
|
||||||
|
|
Loading…
Reference in New Issue