删除权限

pull/3/head
rekoe 9 years ago
parent 8643523e5a
commit 473b2ac574

@ -13,6 +13,7 @@ import org.nutz.dao.Cnd;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.lang.util.NutMap;
import org.nutz.mvc.Mvcs;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok;
import org.nutz.mvc.annotation.Param;
@ -152,4 +153,17 @@ public class AdminProjectAct extends BaseAction {
}
return "";
}
@At("/pjauth/delete")
@Ok("fm:template.admin.project.pjauth")
@RequiresPermissions({ "svn.project:auth.manager" })
@PermissionTag(name = "管理项目权限", tag = "SVN项目管理", enable = true)
public String pjauth_delete(@Param("gr") String gr, @Param("pj") String pj, @Param("res") String res, @Param("usr") String usr) {
if (StringUtils.isNotBlank(gr)) {
projectAuthService.deleteByGr(pj, gr, res);
} else if (StringUtils.isNotBlank(usr)) {
projectAuthService.deleteByUsr(pj, usr, res);
}
return pjauth(pj, res, Mvcs.getReq());
}
}

@ -193,9 +193,11 @@
没有权限
</#if>
</td>
<@shiro.hasPermission name="svn.project:auth.manager">
<td>
<a href="javascript:if(confirm('确认删除?')){del('${base}/pjauth?pj=${pjAuth.pj}&res=${pjAuth.res}&gr=${pjAuth.gr}&usr=${pjAuth.usr}')}">删除</a>
<a href="javascript:if(confirm('确认删除?')){del('pjauth/delete?pj=${pjAuth.pj}&res=${pjAuth.res}&gr=${pjAuth.gr}&usr=${pjAuth.usr}')}">删除</a>
</td>
</@shiro.hasPermission>
</tr>
</#list>
</table>

Loading…
Cancel
Save