accesscontrol: isAllowed returns false incorrectly

isAllowed method has returned false incorrectly sometimes.

This bug is caused by incorrect comparision between user ids in Long
type. They should be compared using equals method, not == operator.
Comparision Long type objects using == operator may seem confused
because sometimes they behave like primitive type objects. For more
details, see https://www.owasp.org/index.php/Java_gotchas#Immutable_Objects_.2F_Wrapper_Class_Caching