fix check permission
Merge branch 'rc3' of github.com:WSO2Mobile/mdm into rc3