original_string: protected function determineRouteAction(Model $model)
      {
          $routeHelper = $this->getRouteHelper();
  
          $permissionPrefix = $routeHelper->getPermissionPrefixForModelSlug(
              $routeHelper->getRouteSlugForModelClass(get_class($model))
          );
  
          // Change the action to show if we don't have edit permissions
          if ( ! cms_auth()->can($permissionPrefix . 'edit')) {
              return 'show';
          }
  
          return 'edit';
      }
code: protected function determineRouteAction(Model $model)
      {
          $routeHelper = $this->getRouteHelper();
  
          $permissionPrefix = $routeHelper->getPermissionPrefixForModelSlug(
              $routeHelper->getRouteSlugForModelClass(get_class($model))
          );
  
          // Change the action to show if we don't have edit permissions
          if ( ! cms_auth()->can($permissionPrefix . 'edit')) {
              return 'show';
          }
  
          return 'edit';
      }
code_tokens: protected function determineRouteAction ( Model $ model ) { $ routeHelper = $ this -> getRouteHelper ( ) ; $ permissionPrefix = $ routeHelper -> getPermissionPrefixForModelSlug ( $ routeHelper -> getRouteSlugForModelClass ( get_class ( $ model ) ) ) ; // Change the action to show if we don't have edit permissions if ( ! cms_auth ( ) -> can ( $ permissionPrefix . 'edit' ) ) { return 'show' ; } return 'edit' ; }
docstring: Returns route action for given model.
  
  The edit action is default, with a fallback to show if no permission is granted.
  
  @param Model $model
  @return string
docstring_tokens: Returns route action for given model .