Problem/Motivation

Social is planning to get rid of node grants and replace them with node query alters.
See PR: https://github.com/goalgorilla/open_social/pull/3961

Proposed resolution

Replace node grants with node query alters.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

vnech created an issue. See original summary.

vnech’s picture

Status: Active » Needs review
vnech’s picture

Issue summary: View changes
vnech’s picture

StatusFileSize
new9.08 KB
vnech’s picture

StatusFileSize
new9.5 KB
navneet0693’s picture

Status: Needs review » Reviewed & tested by the community

nkoporec made their first commit to this issue’s fork.

nkoporec’s picture

Status: Reviewed & tested by the community » Needs review

Pushed a new commit that needs review: https://git.drupalcode.org/project/social_course/-/merge_requests/71/dif...

The issue is that if a user is a verified user and a course leader, then he is able to create a section with a part. After that the user can no longer edit the 'Parts' section, as the error is thrown node:[id] cannot be referenced.

robertragas’s picture

StatusFileSize
new17.65 KB
robertragas’s picture

StatusFileSize
new3.81 KB

Added a new patch that is required on top. As with the new entity query access course_leader role cannot save sections that contains course_articles / course_videos that they are not the owner of.

The error itself is "node x cannot be referenced"

socialnicheguru’s picture

So is the solution the MR and patches from #10, #11?

Update:
1. MR 71 and Patch 10 are essentially the same base
implementation
2. Patch 11 is an incremental patch that adds
course leader access functionality on top of the
base implementation
3. The patches should be applied in sequence:
- First: MR 71 (or Patch 10 if it can be fixed)
- Second: Patch 11

  • ribel committed 477e1f14 on 6.3.x authored by vnech
    Issue #3480856: Replace node grants with node query alters
    
ribel’s picture

Version: 6.1.6 » 6.3.0
Status: Needs review » Fixed

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.