bugfix: #5963 fix Role has_permission? function