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

"Activities" tab and the logging for it is bad for the privacy - should be optional #7927

Closed
1 of 3 tasks
l-jonas opened this issue Aug 21, 2019 · 21 comments · Fixed by #8816 or #11353
Closed
1 of 3 tasks

"Activities" tab and the logging for it is bad for the privacy - should be optional #7927

l-jonas opened this issue Aug 21, 2019 · 21 comments · Fixed by #8816 or #11353
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented

Comments

@l-jonas
Copy link
Contributor

l-jonas commented Aug 21, 2019

Description

Git logs the commit timestamps (which a developer can spoof for better privacy), however gitea logs the push timestamps and some other events. Is it possible to add the option to hide/ disable it per user/ project/ organization?

Note: In the linked example, there is the text "3 weeks ago". When moving the mouse over it, then there is the exact timestamp visible.

Screenshots

@guillep2k
Copy link
Member

Not entirely effective. The push date is written by git, no matter what the pusher sends. Anyone can check the log and see the actual dates if it comes to that.

@l-jonas
Copy link
Contributor Author

l-jonas commented Aug 21, 2019

@guillep2k From the page you linked:

Note, if you fetched from origin/master, it will print the date you fetched it; NOT the date someone else pushed the commit.

So it would be still saved at the git server, but not everyone from the internet would be able to see it

@guillep2k
Copy link
Member

@l-jonas You are right! One can learn something new every day.

@lafriks
Copy link
Member

lafriks commented Aug 24, 2019

I don't see how that could be implemented

@stale
Copy link

stale bot commented Oct 23, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale stale bot added the issue/stale label Oct 23, 2019
@l-jonas
Copy link
Contributor Author

l-jonas commented Nov 3, 2019

There was no activity but the issue does still exist

@stale stale bot removed the issue/stale label Nov 3, 2019
@lunny
Copy link
Member

lunny commented Nov 3, 2019

I can't catch what's the problem. If you have read permission of git repository, you will get all the informations on Activities. The privacy is not from gitea, may you mean git. So I think maybe you could find other VCS tool could resolve that.

@l-jonas
Copy link
Contributor Author

l-jonas commented Nov 3, 2019

@lunny Did you read the whole thread? The "Activities" contain more data than git itself provides. Git itself only provides logs of the commit timestamps but Gitea additionally logs other events (like push timestamps) for the "Activities" and sends it to anyone who requests it.

@guillep2k
Copy link
Member

I don't see why hiding the push date is important, unless you want to make your boss believe you've worked at a different time than you did. 🤣

@l-jonas
Copy link
Contributor Author

l-jonas commented Nov 3, 2019

@guillep2k It's not only a date, it's a timestamp. And it's not for the boss, because it's publicly visible for anyone and for a long time.

@zeripath
Copy link
Contributor

zeripath commented Nov 3, 2019

Ah I think I understand. You would like to say change the displayed timeformat to only say display the day something was done or possibly even the month - not withstanding that if you can access git you can get the full timestamps in any case.

I would say that you could simply set within the app.ini:

...
[time]
format=2006-01-02
...

However, the issue is that:

TestTimeFormat, _ := time.Parse(TimeFormat, TimeFormat)
if TestTimeFormat.Format(time.RFC3339) != "2006-01-02T15:04:05Z" {
log.Fatal("Can't create time properly, please check your time format has 2006, 01, 02, 15, 04 and 05")
}

Enforces that this format has to be fully specified.

Now, looking at the use of TimeFormat I don't think there is a good reason to enforce that we are so strict with this.

A simple fix would be to change that log.Fatal to simple log.Warn.

@l-jonas
Copy link
Contributor Author

l-jonas commented Nov 4, 2019

@zeripath

not withstanding that if you can access git you can get the full timestamps in any case

That's wrong. One can chose anything as commit timestamp and the push timestamps are in the reflog, but are never shared by the git server.

Reducing the accuracy in the Activities tab would be a good default. However, I wrote at the start of this issue what I want

Is it possible to add the option to hide/ disable it [logging for activity tab + showing activity tab] per user/ project/ organization?

@guillep2k
Copy link
Member

@zeripath

not withstanding that if you can access git you can get the full timestamps in any case

That's wrong. One can chose anything as commit timestamp and the push timestamps are in the reflog, but are never shared by the git server.

Reducing the accuracy in the Activities tab would be a good default. However, I wrote at the start of this issue what I want

Is it possible to add the option to hide/ disable it [logging for activity tab + showing activity tab] per user/ project/ organization?

Could you please change the title of the issue, then? So, if contributors know what this is about they might decide to take it. 😄

@l-jonas
Copy link
Contributor Author

l-jonas commented Nov 20, 2019

GitHub has similar features which some users don't like:

(someone posted this links at Codeberg)

It would be good if gitea would be different from GitHub.

@Perflyst
Copy link

Does this here also count in? The "public activity" displays not only git pushes but also what exactly I do. For example if an admin transfer repositories between different users then this should not be visible to everyone. Especially as admin I want to hide the activity of the admin user.

@stale
Copy link

stale bot commented Feb 15, 2020

This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.

@stale stale bot added the issue/stale label Feb 15, 2020
@l-jonas
Copy link
Contributor Author

l-jonas commented Feb 17, 2020

issue is still valid

@stale stale bot removed the issue/stale label Feb 17, 2020
@stale
Copy link

stale bot commented Apr 17, 2020

This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.

@stale stale bot added the issue/stale label Apr 17, 2020
@Perflyst
Copy link

still valid

@stale stale bot removed the issue/stale label Apr 17, 2020
@l-jonas
Copy link
Contributor Author

l-jonas commented May 8, 2020

What looks relevant to me for a hiding feature:

What would be missing:

  • database migration for the new field
  • UI to set the value of the field
  • skipping to save the feed data if it is hidden? only for commits or for everything?
  • handling at the UI level if the user has disabled the activity (e.g. a message "this user disabled the visibility of the activities")

@l-jonas
Copy link
Contributor Author

l-jonas commented May 8, 2020

@lunny lunny added the issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented label May 8, 2020
l-jonas pushed a commit to l-jonas/gitea that referenced this issue May 9, 2020
techknowlogick added a commit that referenced this issue Jun 5, 2020
* Add hide activity option

This closes #7927

* Adjust for linter

* Adjust for linter

* Add tests

* Remove info that admins can view the activity

* Adjust new tests for linter

* Rename v139.go to v140.go

* Rename v140.go to v141.go

* properly indent

* gofmt

Co-authored-by: Jonas Lochmann <git@inkompetenz.org>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
ydelafollye pushed a commit to ydelafollye/gitea that referenced this issue Jul 31, 2020
* Add hide activity option

This closes go-gitea#7927

* Adjust for linter

* Adjust for linter

* Add tests

* Remove info that admins can view the activity

* Adjust new tests for linter

* Rename v139.go to v140.go

* Rename v140.go to v141.go

* properly indent

* gofmt

Co-authored-by: Jonas Lochmann <git@inkompetenz.org>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants