feat(auth): re-implement auth check algorithm

- re-implementation of authorization check algorithm

related to #CAM-979
Merge branch 'master' of github.com:camunda/camunda-bpm-platform