Related Issues:
BDD Meta Issue #1824078: Documentation

When I a docs page has been locked, as an auth user, I see the Edit link and can update everything but the body field. If some one could confirm that the process is working as intended on Git7, I can update the tests to match.

Example page:
http://git7site.devdrupal.org/documentation/install

Screenshots:
Edit is visible: http://www.diigo.com/item/image/17mlr/vsk5
But the body is locked: http://www.diigo.com/item/image/17mlr/gke7


Test Output

@docs @wip
Feature: Prevent users from editing certain pages
  In order to limit changes to certain important documentation pages
  As a site user
  I should not be able to edit pages that were locked by a privileged user

  Scenario: Docs manager creates a document                                   # features/drupalorg/docs_access.feature:7
    Given I am logged in as "docs manager"                                    # FeatureContext::iAmLoggedInAs()
    When I visit "/documentation/install"                                     # FeatureContext::iVisit()
    And I follow "Add child page"                                             # FeatureContext::clickLink()
    And I create a book page with full html                                   # FeatureContext::iCreateABookPageWithFullHtml()
    Then I should see "has been created"                                      # FeatureContext::assertPageContainsText()

  @dependent @known_git7failure
  Scenario: Site user tries to find the Edit link on the above book page      # features/drupalorg/docs_access.feature:15
    Given I am logged in as "site user"                                       # FeatureContext::iAmLoggedInAs()
    When I visit "/documentation/install"                                     # FeatureContext::iVisit()
    And I follow the book page                                                # FeatureContext::iFollowARandomBookPage()
    Then I should not see the link "Edit"                                     # FeatureContext::iShouldNotSeeTheLink()
      The link Edit was present on http://git7site.devdrupal.org/node/1817343 and was not supposed to be.

  @dependent @known_git7failure @clean_data
  Scenario: Site user tries to edit a page directly                           # features/drupalorg/docs_access.feature:22
    Given I am logged in as "site user"                                       # FeatureContext::iAmLoggedInAs()
    When I go to the document edit page                                       # FeatureContext::iGoToTheDocumentEditPage()
    Then I should see "Access Denied"                                         # FeatureContext::assertPageContainsText()
      The text "Access Denied" was not found anywhere in the text of the current page.
    And I should see "You are not authorized to access this page"             # FeatureContext::assertPageContainsText()
    And I should not get a "200" HTTP response                                # FeatureContext::iShouldNotGetAHttpResponse()
    But I should get a "403" HTTP response                                    # FeatureContext::iShouldGetAHttpResponse()

Comments

eliza411’s picture

Title: Documentation - Auth users can edit locked pages » Documentation - Locked pages work differently?
Project: Drupal.org BDD » [Archive] Drupal.org D7 upgrade QA
Version: 7.x-1.x-dev »
Component: Failing test » Miscellaneous
Assigned: Unassigned » senpai

Sorry for the brevity here ... if you follow the steps in the tests, you'll quickly see that a locked page can be edited by a site user. The body field is locked, though, so this may be the new way of doing things. If so, we'll update the tests.

Example page:
http://git7site.devdrupal.org/documentation/install

Screenshots:
Edit is visible: http://www.diigo.com/item/image/17mlr/vsk5
But the body is locked: http://www.diigo.com/item/image/17mlr/gke7

eliza411’s picture

Issue summary: View changes

added meta issue

jhodgdon’s picture

I cannot see the screen shots at those links - maybe you have to have an account? would be better to upload them...

But anyway, this is wrong. Locked documentation pages on d.o should work the same on the new D7 site as they did on the old D6 site, and anything else is a bug.

jhodgdon’s picture

This is definitely a regression of desired d.o documentation behavior. See #1824490: Current method of (D6) locking documentation pages on d.o will not work in d7 for more explanation (that is the issue where this should be discussed and fixed).

eliza411’s picture

Status: Active » Closed (fixed)
eliza411’s picture

Issue summary: View changes

Updating issue to clarify problem.