Skip to content

Feat: Share Projects & Access Controls #81

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

Merged
merged 2 commits into from
Nov 23, 2022

Conversation

li-xin-yi
Copy link
Collaborator

@li-xin-yi li-xin-yi commented Nov 23, 2022

Add public: Boolean and collaboratorIds: String[] to the Repo model, enable inviting collaborators feature and public-shared repos. Probably need to run:

npx prisma migrate dev --name init

in API container

Updates

  1. Load both your own repos and the repos where you work as a collaborator, tagged with public or private.
  2. For your own private repos, show a button for sharing

image

  1. Prompt a window when sharing, enter the email address, then the collaborator can get the repo in "shared repos" section.

image

  1. Alert an error message when
  • The user doesn't have the privilege to share
  • No user is signed up with this email
  • The invited user is the owner or one of their collaborators invited before.
  • The repo is public

image

  1. Also, an option in Right-click Menu in Repo page, no need to go back the homepage

image

Works in the future or on the way

  • Now, users can't access a private repo in which they are neither owners nor collaborators. But it won't show the error, it just keeps loading. I may fix it with explicit error message later. (ETA 1 day)
  • The access feature seems not in a fine-grained. Anyone can access a public repo and edit anything in it. It's terrible. We may consider separating the read and write access individually for the public ones. Besides, even someone hasn't logged in is still supposed to read any public repos. (ETA 3 days ~ 1 week)
  • For those read-only public repos, we should allow fork/clone feature from unauthenticated users. Then collaborators in a public repo can be enabled again. (ETA 1-2 weeks)
  • UI improvement, I just finished the function, but it looks ugly (It depends, please give me some ideas if you have any suggestion)

close #46

Copy link
Collaborator

@lihebi lihebi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great PR, thanks Xinyi!

@lihebi lihebi merged commit 3a6fb2b into codepod-io:main Nov 23, 2022
@lihebi lihebi mentioned this pull request Nov 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Project sharing
2 participants