NullPointerException fuer Hostmaster im Queue-Modul
This commit is contained in:
parent
73fbf80782
commit
85a7dd60bf
@ -74,7 +74,8 @@ public class QueueTask extends AbstractEntity implements Serializable {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean isReadAllowedFor(UnixUser loginUser) {
|
public boolean isReadAllowedFor(UnixUser loginUser) {
|
||||||
return loginUser.hasPacAdminRoleFor(getUser().getPac())
|
return loginUser.hasHostmasterRole()
|
||||||
|
|| loginUser.hasPacAdminRoleFor(getUser().getPac())
|
||||||
|| loginUser.id() == getUser().id();
|
|| loginUser.id() == getUser().id();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -287,9 +287,9 @@ public class UnixUser extends AbstractEntity implements Serializable {
|
|||||||
* determines whether this user account has admin rights on the given pac
|
* determines whether this user account has admin rights on the given pac
|
||||||
*/
|
*/
|
||||||
public boolean hasPacAdminRoleFor(de.hsadmin.mods.pac.Pac pac) {
|
public boolean hasPacAdminRoleFor(de.hsadmin.mods.pac.Pac pac) {
|
||||||
// TODO: hardcoded Hostsharing conventions
|
return pac != null &&
|
||||||
return pac.getName().equals(getName())
|
(pac.getName().equals(getName())
|
||||||
|| hasCustomerRoleFor(pac.getCustomer());
|
|| hasCustomerRoleFor(pac.getCustomer()) );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user