Staff that is not TL4 is unable to pin topics globally anymore

I had two topics pinned globally when I tried to pin 3rd topic but it doesn’t show the option to pin globally. I thought maybe 2 was the max, so I unpinned one of the pinned topics but still, I didn’t get the globally pinning option for any topic, not even for the one I just unpinned globally.

Any idea what might be happening?

Hi,

Same issue for our forum :frowning:

1 Like

Thanks for confirming. I started seeing this issue just recently. Before it was working fine.

Hi, We have the exact same problem (with the latest beta version and can reproduce it in safe-mode), no option for global pinning anymore.

Bug?

1 Like

Oh @jamie.wilson I think this is your change, some staff may be TL1/2/3, we should have a staff check here not a trust level check.

Workaround, set your staff to TL4, they will be allowed to pin.

https://github.com/discourse/discourse/blob/0476ea00ccadc2d45550f4d7be9db4971f4eaea9/app/assets/javascripts/discourse/app/controllers/feature-topic.js#L50-L53

7 Likes

Dear Sam Sir,

Issue Resolved thanks :slight_smile:

Thanks for quick support ! :love_you_gesture:

1 Like

Yes please. :+1:

Thanks for the workaround, now it works. :wink:

1 Like

@sam one of our users (TL3) has mentioned he can no longer pin topics of his choice on top of the categories as he used to.

Could this be related? Is it some new setting we have to change? I don’t want to assign TL4 to this user so he is able to do this.

Pin globally is certainly only a tl4/staff thing

Not something category moderators should be allowed to do, it has site wide implications

Pin within categories seems fine for category moderators

6 Likes

It’s super weird to me that staff would be a low trust level, but we should fix this. @jamie.wilson can you return true if staff too?

4 Likes

This was my error - I should have always been using canManageTopic:

  isElder: equal("trust_level", 4),
  canManageTopic: or("staff", "isElder"),

The test for the change that introduced this bug included:

needs.user({ admin: true });

As I understand it, needs.user returns the eviltrout user which has a bunch of elevated permissions by default.

      trust_level: 4,
      moderator: true,
      admin: true,

Having a trust_level of 4 meant isElder was true.

Assuming my understanding of how it works is true, would it make sense for our tests to return a ‘normal’ user by default?

2 Likes

https://github.com/discourse/discourse/pull/12435

A fix for staff not being able to pin/unpin topics has been merged in.

4 Likes