Fix checkPermission for secondary users