added check of permissions for the show action and fixed the scope.