fix permission check typo (thanks to #4365)
Merge pull request #489 from necrodoom/patch-23

fix permission check typo (thanks to #4365)