Issue fork bookmarks-3320230

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

rdworianyn created an issue. See original summary.

rdworianyn’s picture

Issue summary: View changes

Please disregard, this was a conflict with another module. I swore I was testing on a fresh install, but I stand corrected.

rdworianyn’s picture

cestmoi’s picture

I just installed and testing the module and got this issue too.
I'm having this same issue and I have no such conflict with another Flag module.
Only admin can access the block (no roles restricted).
Flag Bookmark and Unflag Bookmark permissions are given to authenticated users.
Same even if I give users permission to See Other's Bookmarks just to test.

asherry’s picture

Status: Active » Needs review
StatusFileSize
new2.12 KB

We're having the same issue. This block is doing its access check based on \Drupal\flag\Entity\Flag::access(). I don't know if/when things changed, but, the flag module doesn't actually seem to use the ::access() method for flagging, it seems to just use that for administration.

Access to see if a user has the permission to do a flag action is done with the "access_check" tagged services FlagAccessCheck and UnFlagAccessCheck. It makes sense I guess, the actual places it needs to check access are primarily done in routes. These methods are calling the Flag::actionAccess method and rather than use "create" as an action, it uses "flag" and "unflag".

I added a patch to check which action needs to be sent to ::actionAccess and then returned that for ::blockAcces.

asherry’s picture

StatusFileSize
new5.61 KB

Fixed two major issues with the last patch.

  • Before auto alias creation we need to check if the current page is 404. (this might need more work)
  • Check to see if there is an existing alias in the current language, OR in language unspecified.
jcandan’s picture

Status: Needs review » Reviewed & tested by the community

Patch #6 fixed the issue for us on Drupal 10.3.0 with Bookmarks 1.0.2.

jcandan’s picture

Status: Reviewed & tested by the community » Needs work

Seems I missed a bug. After applying the patch, the links and title fields don't show in the Bookmarks list table. Digging.

jcandan’s picture

Title: Only admins can access bookmark block » Fix bookmark link not shown for non-admin users

jcandan’s picture

Status: Needs work » Needs review

  • jcandan committed fd409d46 on 1.0.x
    Issue #3320230: Fix bookmark link not shown for non-admin users
    
jcandan’s picture

Status: Needs review » Fixed
asherry’s picture

Did you actually use the patch I had? I don't see a credit associated with this issue, or maybe it was because I got a warning that says "Double check attribution"

jcandan’s picture

Status: Fixed » Reviewed & tested by the community
jcandan’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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

problue solutions’s picture

Dev version dated 12 July 2024 fixes the access problem, but the issue descibed in #8 (links not appearing in bookmark list table) is not fixed.

jcandan’s picture

Apologies, I should have noted this here before. The bug described in #8 and #18 should be resolved by #3366545: Fix Bookmarks view is missing a display.