Handling api::applications in permissions#put, some refactorings
...