Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMS perm: cannot edit published Lichess blogs #16672

Closed
SergioGlorias opened this issue Dec 26, 2024 · 3 comments · Fixed by #16785 or #16788
Closed

CMS perm: cannot edit published Lichess blogs #16672

SergioGlorias opened this issue Dec 26, 2024 · 3 comments · Fixed by #16785 or #16788

Comments

@SergioGlorias
Copy link
Member

as soon as a lichess blog is created (it doesn't matter if it's still a draft)
The person who only has access to the CMS can only edit blogs by accessing the drafts
This means that corrections to published blogs can only be made by mod blog

@yafred
Copy link
Contributor

yafred commented Jan 16, 2025

There is a difference between the permissions needed to draft (LichessTeam) and edit (Pages) ... this may be the issue.

However, reading the code, I don't understand how you get to create a draft in the first place.

Code says:
To create a draft, you need to be an editor or have Lichess Team permission and be lichess user
How do you impersonate lichess user ?

    def edit(using me: Option[Me]): Boolean =
      me.exists(creator.is(_)) ||
        (creator.is(UserId.lichess) && Granter.opt(_.Pages)) ||
        moderate
    def draft(using me: Option[Me]): Boolean =
      edit || (creator.is(UserId.lichess) && Granter.opt(_.LichessTeam))

@SergioGlorias
Copy link
Member Author

CMS perms is the Pages perms

In this case, the issue is that the edit button does not appear on Lichess blogs for those who have Pages perms.

Screenshot_20250116_151633_Chrome.png

In other words, once published, the person does not have access to edit the blog.

lichess team permission, allows you to view a lichess blog before it is published, but cannot edit it

@yafred
Copy link
Contributor

yafred commented Jan 16, 2025

I reproduced it ... I'll look for a solution

Actually, if you have the permissions, you can still edit it by manually composing the url

Say your post is:
http://localhost:9663/@/Lichess/blog/lichess-article-by-boris/Widmewrv

You can edit it with:
http://localhost:9663/ublog/Widmewrv/edit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants