gitea icon indicating copy to clipboard operation
gitea copied to clipboard

Public activity in user profile not shown

Open lafriks opened this issue 3 years ago • 3 comments
trafficstars

Description

When server is private than when opening user profile it's public activity is shown only for admin users, for other users it's hidden

Gitea Version

1.17.2

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

Not relevant

Database

No response

lafriks avatar Sep 15 '22 21:09 lafriks

Is the user public or private?

lunny avatar Sep 16 '22 00:09 lunny

As I could not replicate issue on my local instance, I tracked down issue to user table column keep_activity_private had null values instead of false. Still have no idea how they got there... could be either broken migration when column was added or ldap sync adding null values there 🤔

Anyway we should really make rule in database that all bool columns in database should be not null this would prevent such issues.

in case anyone else has this issue, temporary fix is to run this update in gitea database:

update "user" set keep_activity_private = false where keep_activity_private is null;

lafriks avatar Sep 16 '22 14:09 lafriks

@lafriks see #18871

KN4CK3R avatar Sep 18 '22 12:09 KN4CK3R