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
Hide email addresses everywhere #3358
Comments
|
+1 notabug also wants this feature and currently implements it as a routine upgrade chore this is currently the most cautious upgrade task as it is implemented as a HideEmail bool on the User model which breaks the upstream schema if PR is welcome this would make notabug very happy |
|
Is this even viable? Since one can still pull a users repo (given it's public of course) and Only reason to hide emails from the UI is related to spiders, and in that case a global setting is enough IMO |
|
Non-login user is already not possible to see the emails in profile page. |
|
Well, if I was to scrape for email-addresses I'd create a user in that case, so the argument is still valid |
|
ok i am very unfamiliar with this codebase ATM but let me try to clarify the issue as i see it the email address that you git commit is not the concern here - my assumption is that the email address on the User model as shown on the user profile page is not necessarily the same as your usual public git commit address - on other hosts such as github my primary email address is NOT the one that i commit with for the very reason that i expect spam at my git commit address and i check its inbox only rarely - the primary email is used for notifications and admin communications - then additional alternate email addresses can be defined for matching git commits UPDATE: |
|
@unknwon the problem is not about non-login users, this already works very well. The problem is that we would like to hide email addresses to logged in users as well. @bkcsoft your point is totally correct. However I don't think it's a problem if a user git-pushes his commits using some email. That's public anyway, nobody can expect it to be private. Plus they can be using 2 different emails, one for registering to Gogs, and another one in their local git configuration. The way to fix this issue would be: 1 - hide users emails in every Gogs HTML template (for example in the user homepage). Currently this works only partially, because registered users can still see other users' emails 2 - when I commit from Gogs, for example when I create a new repo and select "Initiate with Readme file", Gogs uses the user email to push the new commit. This shouldn't happen. Gogs should just push using the username and no email address As I said, if users commit something using some email, then pushes to Gogs, well here nobody can do anything, Gogs is not responsible for this. But the email address I used to sign up to Gogs with, this should never be public. |
|
as i said i am just getting familiar with this project now but i am working on this feature regardless of whether or not upstream wants it - perhaps you could give me a head start?
|
|
@bill-auger the only page that I know is displaying the user email, is their own homepage. To be clearer, this page here. I'm not aware of any other place. As far as I know, git always remembers the email you committed with. So for example, if I commit with email A, then again with email B, and then push to Gogs. A and B is what you'll see. What I was talking about is that if I create a new repo from Gogs (ie you select "Create new repo"), and also select "Initialize repo with Readme" (always from Gogs), Gogs creates the new repo, and then does the first commit (with the Readme file and possibly the .gitignore if you've selected that as well). This commit done from Gogs, withing Gogs, is registered with "Gogs username < Gogs email >", which I think you can read if you download the repo and reads the commit history. |
|
@bill-auger to explain with an example, I've just created a throwaway account at try.gogs.io. Then, from Gogs, I've create a new repo using these settings as you can see I didn't push anything myself, just created a new account and a new repo. Now, I invite you to clone my repo and look at the commit history. You'll see my email address that I used to register to Gogs with. |
|
thanks - yes i understand you last point - that is probably a separate issue than this one i was aware of the user profile page - that is actually the one place that some may want it to be visible - but the issue title says "everywhere" so i figured there were more i have located two pages where the email address is shown
please anyone let me know if there are more pages that show the email |
* add ShowEmail bool to User model * add show/hide email checkbox on user profile settings form * add show/hide email checkbox on admin edit user form * add ShowEmail to user profile settings post handler * add ShowEmail to admin edit user post handler * show/hide emails on user profile and users directory per User.ShowEmail bool * add en/US translation for 'show_email'
* add ShowEmail bool to User model * add show/hide email checkbox on user profile settings form * add show/hide email checkbox on admin edit user form * add ShowEmail to user profile settings post handler * add ShowEmail to admin edit user post handler * show/hide emails on user profile and users directory per User.ShowEmail bool * add en/US translation for 'show_email'
* add ShowEmail bool to User model * add show/hide email checkbox on user profile settings form * show/hide emails on user profile and users directory per ShowEmail bool * add en/US translation for 'show_email'
* add ShowEmail bool to User model * add show/hide email checkbox on user profile settings form * add show/hide email checkbox on admin edit user form * add ShowEmail to user profile settings post handler * add ShowEmail to admin edit user post handler * show/hide emails on user profile and users directory per User.ShowEmail * add en/US translation for 'show_email'

At the moment registered users can see the email address of other users. Could you please add an option, either globally in app.ini or as a user setting, to hide the email address completely from everybody (included both registered users and visitors)? Thanks
The text was updated successfully, but these errors were encountered: