Commit 20ee1280 authored by catch's avatar catch
Browse files

Issue #3152848 by alexpott: Clean up bc_entity_resource_permissions code - it...

Issue #3152848 by alexpott: Clean up bc_entity_resource_permissions code - it does not exist anymore
parent 308db361
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -74,10 +74,6 @@ protected function getNormalizedPostEntity() {
   * {@inheritdoc}
   */
  protected function getExpectedUnauthorizedAccessMessage($method) {
    if ($this->config('rest.settings')->get('bc_entity_resource_permissions')) {
      return parent::getExpectedUnauthorizedAccessMessage($method);
    }

    switch ($method) {
      case 'GET':
        return "The 'view config_test' permission is required.";
+0 −12
Original line number Diff line number Diff line
@@ -59,18 +59,6 @@ protected function setUpAuthorization($method) {
    }
  }

  /**
   * {@inheritdoc}
   */
  protected function grantPermissionsToTestedRole(array $permissions) {
    // testPatch() and testDelete() test the 'bc_entity_resource_permissions' BC
    // layer; also call makeCurrentUserFileOwner() then.
    if ($permissions === ['restful patch entity:file'] || $permissions === ['restful delete entity:file']) {
      $this->makeCurrentUserFileOwner();
    }
    parent::grantPermissionsToTestedRole($permissions);
  }

  /**
   * Makes the current user the file owner.
   */
+0 −4
Original line number Diff line number Diff line
@@ -89,10 +89,6 @@ protected function getNormalizedPostEntity() {
   * {@inheritdoc}
   */
  protected function getExpectedUnauthorizedAccessMessage($method) {
    if ($this->config('rest.settings')->get('bc_entity_resource_permissions')) {
      return parent::getExpectedUnauthorizedAccessMessage($method);
    }

    switch ($method) {
      case 'GET':
        return "The 'access shortcuts' permission is required.";
+0 −4
Original line number Diff line number Diff line
@@ -136,10 +136,6 @@ protected function getNormalizedPostEntity() {
   * {@inheritdoc}
   */
  protected function getExpectedUnauthorizedAccessMessage($method) {
    if ($this->config('rest.settings')->get('bc_entity_resource_permissions')) {
      return parent::getExpectedUnauthorizedAccessMessage($method);
    }

    return "The 'administer entity_test content' permission is required.";
  }