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

Use id to access orgs #1873

Merged
merged 65 commits into from
Jul 21, 2023
Merged

Use id to access orgs #1873

merged 65 commits into from
Jul 21, 2023

Conversation

anbraten
Copy link
Member

@anbraten anbraten commented Jun 19, 2023

closes #1743

fixes: setting secrets for own user namespace

TODO

  • create org on repo activation
  • add org_id property to repo
  • load secrets using org_id
  • change org api endpoints to use org_id
  • change org-secrets endpoints to use org_id
  • change user is member (membership / service) endpoint to use org_id
  • support personal (org = user)
  • add api endpoint to get repos of org (=> separate PR)
  • add migration to create orgs for existing repos and set repo.org_id
  • add migration to set org_id for secrets
  • adjust UI
  • test adding repo
  • test loading org
  • test org secrets CRUD

@6543 6543 added this to the 1.0.0 milestone Jul 2, 2023
@anbraten anbraten added refactor delete or replace old code breaking will break existing installations if no manual action happens labels Jul 9, 2023
@anbraten anbraten marked this pull request as ready for review July 9, 2023 17:33
@anbraten anbraten requested a review from a team July 9, 2023 18:04
@woodpecker-bot
Copy link
Collaborator

woodpecker-bot commented Jul 9, 2023

Deployment of preview was successful: https://woodpecker-ci-woodpecker-pr-1873.surge.sh

@6543
Copy link
Member

6543 commented Jul 17, 2023

Ok ironed out edgecases and fixed a bug while writing tests - also tested it against a database of a big installation.

This is ready :)

@6543
Copy link
Member

6543 commented Jul 17, 2023

@anbraten you can not lgtm your own pull ... but you could create a comment that sates the same

so if you have time, could you review my changes :)

@6543 6543 requested a review from a team July 17, 2023 22:48
@6543 6543 requested a review from lafriks July 20, 2023 23:19
server/api/org.go Outdated Show resolved Hide resolved
server/api/org.go Outdated Show resolved Hide resolved
server/api/org.go Outdated Show resolved Hide resolved
@anbraten
Copy link
Member Author

lgtm apart from remaining threads. One thing I am not sure about is if the catch orgs for users which wont login themself to woodpecker. Exp I am a member of a repo from 6543/example, but he doesn't use / login to woodpecker. In that case we would not create that org I guess.

@6543
Copy link
Member

6543 commented Jul 21, 2023

In that edgecase the oser is handled like an org ... witch does not conflict in any way ... tested it also

@6543 6543 self-assigned this Jul 21, 2023
@6543 6543 removed their assignment Jul 21, 2023
@6543 6543 requested a review from lafriks July 21, 2023 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking will break existing installations if no manual action happens refactor delete or replace old code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Access orgs by id
5 participants