This always return exception, cause there is no primary holder in method isAuthrorizedForAttribute. Better is to get list of Groups first, then iterate through them and try isAuthorizedForAttribute(sess, ActionType.READ, attribute, g, null) for all of them. If actor has no right for any group and this attribute, return privilege exception with MESSAGE about, what happen.
HINT: if(AuthzResolver.isAuthorizedForAttribute(sess, READ, attr, group, null)) say "IF actor has right to read this attribute of group then". (this one in your code throw exception always if user has right)