Fixed the entity namespace on repository
Fixed the argument on getPermissions and added toArray instruction to the entity getPermissions