Made permission modal popup working again, closes #1158.
Merge pull request #1232 from cmfcmf/#1158

Made permission modal popup working again, closes #1158.