change permissions retrieval to return a promise
Merge branch 'Dev_Generic'