added hasPermissionFor method with tests