Mercurial > lada > lada-server
changeset 959:391ef3356b60
Use the netzbetreiber id value instead of casting data to ort and request
netzbetreiberid again.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Thu, 26 May 2016 12:20:15 +0200 |
parents | ac7985874392 |
children | 7fc536615624 |
files | src/main/java/de/intevation/lada/util/auth/NetzbetreiberAuthorizer.java |
diffstat | 1 files changed, 1 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/de/intevation/lada/util/auth/NetzbetreiberAuthorizer.java Thu May 26 10:23:26 2016 +0200 +++ b/src/main/java/de/intevation/lada/util/auth/NetzbetreiberAuthorizer.java Thu May 26 12:20:15 2016 +0200 @@ -12,7 +12,6 @@ import de.intevation.lada.util.rest.RequestMethod; import de.intevation.lada.util.rest.Response; -import de.intevation.lada.model.stamm.Ort; public class NetzbetreiberAuthorizer extends BaseAuthorizer { @@ -45,8 +44,7 @@ // XXX: this currently allows any user, regardless of function, // to manipulate and delete any ort of his own netzbetreiber! clazz.getName().equals("de.intevation.lada.model.stamm.Ort") && - userInfo.getNetzbetreiber().contains( - ((Ort)data).getNetzbetreiberId())); + userInfo.getNetzbetreiber().contains(id)); } @Override