[Minor] Allow to override privilegeValue in StrolchElementQuery
use this together with the value "internal" to define queries as internal, so you can make them executable without having to allow all queries
This commit is contained in:
parent
d25e7577f7
commit
41f5f22574
|
@ -100,5 +100,7 @@ public class StrolchConstants {
|
||||||
|
|
||||||
public static final String PRIVILEGE_INVALIDATE_SESSION = "InvalidateSession";
|
public static final String PRIVILEGE_INVALIDATE_SESSION = "InvalidateSession";
|
||||||
public static final String PRIVILEGE_GET_SESSION = "GetSession";
|
public static final String PRIVILEGE_GET_SESSION = "GetSession";
|
||||||
|
|
||||||
|
public static final String INTERNAL = "internal";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,17 +22,24 @@ import li.strolch.utils.dbc.DBC;
|
||||||
*/
|
*/
|
||||||
public abstract class StrolchElementQuery<T extends QueryVisitor> implements StrolchQuery {
|
public abstract class StrolchElementQuery<T extends QueryVisitor> implements StrolchQuery {
|
||||||
|
|
||||||
|
private String privilegeValue;
|
||||||
|
|
||||||
protected Navigation navigation;
|
protected Navigation navigation;
|
||||||
protected Selection selection;
|
protected Selection selection;
|
||||||
|
|
||||||
public StrolchElementQuery() {
|
public StrolchElementQuery() {
|
||||||
// empty
|
this.privilegeValue = getClass().getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
public StrolchElementQuery(Navigation navigation) {
|
public StrolchElementQuery(Navigation navigation) {
|
||||||
|
this();
|
||||||
this.navigation = navigation;
|
this.navigation = navigation;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setPrivilegeValue(String privilegeValue) {
|
||||||
|
this.privilegeValue = privilegeValue;
|
||||||
|
}
|
||||||
|
|
||||||
public void setNavigation(Navigation navigation) {
|
public void setNavigation(Navigation navigation) {
|
||||||
this.navigation = navigation;
|
this.navigation = navigation;
|
||||||
}
|
}
|
||||||
|
@ -110,6 +117,6 @@ public abstract class StrolchElementQuery<T extends QueryVisitor> implements Str
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Object getPrivilegeValue() {
|
public Object getPrivilegeValue() {
|
||||||
return getClass().getName();
|
return this.privilegeValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue