Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
1.2.2
-
None
Description
I'm sure that I'm not the first who want it, but not found request about that. Are there any plans for supporting variables in Shiro annotations? Instead of dynamic checking like that:
public Project getProject(String id) {
SecurityUtils.getSubject().checkPermissions("project:" + id + ":read");
...
}
it would be nice to have:
@RequiresPermissions(
{"project:#id:read"})
public Project getProject(String id) {
...
}
variable reference could be in other syntax (${id}, $id, [id]...) or for better backward compatibility variables should be marked by new annotation just like:
@RequiresPermissions(
{"project:#id:read"})
public Project getProject(@ShiroVariable("id") String id) {
...
}