Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Feature] Private README.md for organization#32872

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
wxiaoguang merged 24 commits intogo-gitea:mainfromchangchaishi:private-readme
Dec 31, 2024

Conversation

@changchaishi
Copy link
Contributor

@changchaishichangchaishi commentedDec 17, 2024
edited by wxiaoguang
Loading

Implemented#29503

Changes:

  1. Since individual users and organizations use the same.profile repository name forREADME.md, adding the private one, I rename the contexts withPublic andPrivate inside them.
  2. I wanted to load the private profile the same as GitHub, which uses theview_as query parameter. Still, the existing query scheme is quite limited due to the integration with the search form and the repository paginator, so my workaround is to forcefully bring augmented query strings of member/public to the tmpl file.
  3. The drop-down is adopted from the search box's sort by component, we need to discuss the stylings.

Things lack and need further guidance (update: all done)

  1. At the create repository page, the ideal user experience is when the repo name is entered.profile themake repository private checkbox should be disabled and stay unchecked, whereas.profile-private, the checkbox should be disabled and force checked.
  2. Follow 1., Tool tips should be added.
  3. The translation and CSS for the current drop box and view as public/member feature.

Screenshots:

image

@GiteaBotGiteaBot added the lgtm/need 2This PR needs two approvals by maintainers to be considered for merging. labelDec 17, 2024
@github-actionsgithub-actionsbot added modifies/goPull requests that update Go code modifies/templatesThis PR modifies the template files labelsDec 17, 2024
@changchaishi
Copy link
ContributorAuthor

changchaishi commentedDec 23, 2024
edited by wxiaoguang
Loading

Hi, I listed the behaviors that this PR implemented as below:

  • hints to create.profile and.profile-private repos (if users do not follow the hint, profile may not show)
Details

private_hint

  • view_as drop down only shows when the user is member in organization and both public and member profiles exist
Details

only_shows_when_2_present

  • If there is no profile repo, not showingoverview tab
Details

no_profiles_no_overview

  • When user is a member of org and logged in, and only 1 profile is present, show that profile
Details

public_only_show_public
private_shows_private

  • When user is not logged in, or not a member, only public profile will show if it is present
Details

non_member_can_show

@changchaishichangchaishi marked this pull request as ready for reviewDecember 23, 2024 06:10
@wxiaoguang
Copy link
Contributor

Could you add some tests intests/integration/org_*.go to verify the "view as public" and "view as member" outputs?

If I understand correctly: view as public: private repositories won't be listed.

@changchaishi
Copy link
ContributorAuthor

If I understand correctly: view as public: private repositories won't be listed.

In this designview as is only to select profiles. The permission system decides whether the doer can access the README.md. Nothing has changed.

So viewing as public does not mean that a member user will not see private repos listed if he/she already has permission.

@wxiaoguang
Copy link
Contributor

wxiaoguang commentedDec 27, 2024
edited
Loading

If I understand correctly: view as public: private repositories won't be listed.

In this designview as is only to select profiles. The permission system decides whether the doer can access the README.md. Nothing has changed.

Maybe GitHub also changed their behavior:You are viewing the README and **pinned** repositories as a public user. vsYou are viewing the README and repositories as a public user. I wouldn't say it is good but it doesn't block since GitHub does so.

While I still think it needs to add some tests intests/integration/org_*.go to verify the "view as public" and "view as member" outputs, to cover the new code's behavior.

@changchaishi
Copy link
ContributorAuthor

While I still think it needs to add some tests intests/integration/org_*.go to verify the "view as public" and "view as member" outputs, to cover the new code's behavior.

I'm working on it. Trying to get familiar with the integration tests.

@lunnylunny added this to the1.24.0 milestoneDec 29, 2024
@wxiaoguangwxiaoguang marked this pull request as ready for reviewDecember 30, 2024 15:25
@lunny
Copy link
Member

Looks like the dropdown is not in the right place.

image

@wxiaoguang
Copy link
Contributor

Looks like the dropdown is not in the right place.

It is#32872 (comment) :

I think we need to move the view-as dropdown to the sidebar (just like GitHub) then we could have more spaces for hints and we could add more features to it in the future.

@GiteaBotGiteaBot added lgtm/need 2This PR needs two approvals by maintainers to be considered for merging. and removed lgtm/need 1This PR needs approval from one additional maintainer to be merged. labelsDec 31, 2024
@GiteaBotGiteaBot added lgtm/need 1This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2This PR needs two approvals by maintainers to be considered for merging. labelsDec 31, 2024
@GiteaBotGiteaBot added lgtm/doneThis PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1This PR needs approval from one additional maintainer to be merged. labelsDec 31, 2024
@wxiaoguangwxiaoguangenabled auto-merge (squash)December 31, 2024 03:58
@wxiaoguangwxiaoguang added the reviewed/wait-mergeThis pull request is part of the merge queue. It will be merged soon. labelDec 31, 2024
@wxiaoguangwxiaoguang merged commit0387195 intogo-gitea:mainDec 31, 2024
26 checks passed
@GiteaBotGiteaBot removed the reviewed/wait-mergeThis pull request is part of the merge queue. It will be merged soon. labelDec 31, 2024
@wxiaoguang
Copy link
Contributor

Then we can add "org profile wiki" link easily: Add profile wiki to org home#32947

@wxiaoguangwxiaoguang mentioned this pull requestDec 31, 2024
@changchaishichangchaishi deleted the private-readme branchDecember 31, 2024 06:09
wxiaoguang added a commit that referenced this pull requestDec 31, 2024
zjjhot added a commit to zjjhot/gitea that referenced this pull requestJan 2, 2025
* giteaofficial/main:  [skip ci] Updated translations via Crowdin  unset XDG_HOME_CONFIG as gitea manages configuration locations (go-gitea#33067)  Refactor repo-new.ts (go-gitea#33070)  Refactor pull-request compare&create page (go-gitea#33071)  feat: link to nuget dependencies (go-gitea#26554)  Remove some unnecessary template helpers (go-gitea#33069)  Inherit submodules from template repository content (go-gitea#16237)  [skip ci] Updated translations via Crowdin  feat(action): issue change title notifications (go-gitea#33050)  Use project's redirect url instead of composing url (go-gitea#33058)  Fix unittest and repo create bug (go-gitea#33061)  Fix locale type (go-gitea#33059)  Refactor maven package registry (go-gitea#33049)  Optimize the installation page (go-gitea#32994)  [Feature] Private README.md for organization (go-gitea#32872)  Make issue suggestion work for new PR page (go-gitea#33035)  Add IntelliJ Gateway's .uuid to gitignore (go-gitea#33052)
@go-giteago-gitea locked asresolvedand limited conversation to collaboratorsMar 31, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

@lunnylunnylunny approved these changes

@wxiaoguangwxiaoguangwxiaoguang approved these changes

Assignees

No one assigned

Labels

lgtm/doneThis PR has enough approvals to get merged. There are no important open reservations anymore.modifies/apiThis PR adds API routes or modifies themmodifies/frontendmodifies/goPull requests that update Go codemodifies/templatesThis PR modifies the template filesmodifies/translationtype/featureCompletely new functionality. Can only be merged if feature freeze is not active.

Projects

None yet

Milestone

1.24.0

Development

Successfully merging this pull request may close these issues.

Support a member-only organisation profile README

4 participants

@changchaishi@wxiaoguang@lunny@GiteaBot

[8]ページ先頭

©2009-2025 Movatter.jp