Hi,
I have a locked discussion on my forum but I noticed that regular users are able to reply to that discussion anyway.

The database confirms that the discussion is locked:

Could it be something wrong with the permissions or is it maybe a bug?

EDIT: I'm on beta8

    matteocontrini can you maybe try to replicate on https://beta.flarum.site/ ?

    In any case we'll need more details. Can you share the php flarum info and does it only happen for a specific discussion ? If so anything particular about that discussion you think might be relevant ?

    If we can't replicate the issue on beta 9... Well it's good for Flarum. There won't be any fix for beta 8 anyway.

    I can't replicate on the beta website.

    It doesn't happen with every discussion but only with this specific one (AFAIK, since I can't check all of them).

    The discussion might (?) be particular because it was a bit like a "welcome" discussion, where many people said hello when they signed up. The discussion is a sticky one, there are some posts that have been split in new discussions, and it's been locked/unlocked multiple times in the past.

    Flarum info:

    Flarum core 0.1.0-beta.8.2
    PHP version: 7.2.17-0ubuntu0.18.04.1
    Loaded extensions: Core, date, libxml, openssl, pcre, zlib, filter, hash, pcntl, Reflection, SPL, sodium, session, standard, mysqlnd, PDO, xml, calendar, ctype, curl, dom, mbstring, fileinfo, ftp, gd, gettext, iconv, json, exif, mysqli, pdo_mysql, Phar, posix, readline, shmop, SimpleXML, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xmlreader, xmlwriter, xsl, Zend OPcache
    +-------------------------------+-----------------+------------------------------------------+
    | Flarum Extensions             |                 |                                          |
    +-------------------------------+-----------------+------------------------------------------+
    | ID                            | Version         | Commit                                   |
    +-------------------------------+-----------------+------------------------------------------+
    | flarum-bbcode                 | v0.1.0-beta.8   |                                          |
    | flarum-emoji                  | v0.1.0-beta.8   |                                          |
    | flarum-flags                  | v0.1.0-beta.8.1 |                                          |
    | flarum-likes                  | v0.1.0-beta.8.1 |                                          |
    | flarum-markdown               | dev-master      | e11a86001396aff7322f7b60aee614234daadd41 |
    | flarum-sticky                 | v0.1.0-beta.8   |                                          |
    | flarum-suspend                | v0.1.0-beta.8   |                                          |
    | flarum-tags                   | v0.1.0-beta.8.2 |                                          |
    | flarum-approval               | v0.1.0-beta.8   |                                          |
    | flarum-mentions               | dev-fc8         | ad509a766e73f14b8bb04e13d0b33c86d315f47b |
    | flarum-subscriptions          | dev-fc8         | 83964f639e54276167b58153e6d4e97da5b0a4f4 |
    | flarum-lang-english           | v0.1.0-beta.8   |                                          |
    | flarum-statistics             | v0.1.0-beta.8   |                                          |
    | flarum-auth-github            | v0.1.0-beta.8   |                                          |
    | flarum-auth-facebook          | v0.1.0-beta.8   |                                          |
    | flarum-auth-twitter           | v0.1.0-beta.8   |                                          |
    | flarum-pusher                 | v0.1.0-beta.8.1 |                                          |
    | flagrow-analytics             | 0.8.0           |                                          |
    | fof-links                     | 0.2.0           |                                          |
    | fof-user-bio                  | 0.1.2           |                                          |
    | clarkwinkelmann-emojionearea  | 0.2.0           |                                          |
    | flagrow-ads                   | 0.2.0-beta.1    |                                          |
    | botfactoryit-italian          | dev-master      | f2c3e604e35e5676f4c24d9dd8a7b1f9a4d473c8 |
    | flagrow-impersonate           | 0.2.0           |                                          |
    | flagrow-sitemap               | 0.2.0           |                                          |
    | fof-share-social              | 0.1.1           | df0217f4f2080d978059fa4406454ef63eb1b1a9 |
    | fof-pages                     | 0.2.3           |                                          |
    | fof-disposable-emails         | 0.1.0           |                                          |
    | botfactoryit-upload           | dev-master      | 3b5d8c03d773c398fa6798259df89dc0f3008672 |
    | flagrow-amazon-affiliation    | dev-master      | 82438b92a63c096b32b88189c78d338bf7ecea52 |
    | clarkwinkelmann-circle-groups | 0.2.1           |                                          |
    | v17development-seo            | 1.0.1           |                                          |
    | fof-split                     | 0.4.3           | 53b163f0e5043bb014a35a99dd834042148babe4 |
    | botfactoryit-fibraclick       | dev-master      | bc4f9f8d9f84a575cb1b790d466f50cd51830891 |
    | flarum-lock                   | v0.1.0-beta.8   |                                          |
    +-------------------------------+-----------------+------------------------------------------+
    Base URL: https://forum.fibra.click
    Installation path: /usr/local/openresty/nginx/www/fibraclick-forum
    Debug mode: off

    EDIT: "flarum-lock" is at the bottom probably because I disabled and re-enabled it to see if it changed something...

    EDIT2: the markdown, mentions, subscriptions extensions point to a commit because I forked them to do some minor changes like translating some strings

      matteocontrini forked them to do some minor changes like translating some strings

      Not sure about your locked discussion problem, but translations you can modify by using flagrow/linguist.

      I see you are on beta 8.2, you might want to try to update to beta 9 and see if the problem persists.

      Are you able to respond to the discussion if you make a test user with no special perms ?

        datitisev but translations you can modify by using flagrow/linguist.

        Email templates are not translatable without modifying source files

        datitisev Are you able to respond to the discussion if you make a test user with no special perms ?

        You mean on my forum? Yes

        matteocontrini changed the title to Locked discussion isn't locked .

        If I run app.current.discussion.isLocked() on the page of the discussion I get "true", and if I run app.current.discussion.canReply() I get true. Other locked discussions return false in the second case though, as it should be. How is that field set? I guess it goes through the permissions system somehow because I can't find any reference to it in the source code of the lock extension...

        EDIT: another thing about this discussion is that it's in a category/tag that has specific permissions that are slightly different from the rest of the forum. For example, users can't start discussions in this tag, but can reply to posts. Could it be that this last permission overrides the lock status?

        4 days later

        Can anyone think of a workaround to force-lock the discussion having this issue, in some way? Even if it's hacky...

        a month later

        Hi, having the same issues with tags configured with restrictions. Members can create posts when the discussion is locked by a moderator or admin

        Tags without restriction (like only members can Participate on specific tags) do not have the issue.

        I'm on beta 9 now. Was hoping this one was fixed in this release 😅