ubiquity-os / ubiquity-os-plugin-installer

A GUI to install UbiquityOS plugins.
0 stars 8 forks source link

Organization selection choices #26

Open Keyrxng opened 3 days ago

Keyrxng commented 3 days ago

I am only seeing two orgs but I am in more orgs that that, how are they chosen?

Orgs to select for editing come from the below method currently

https://docs.github.com/en/rest/orgs/orgs?apiVersion=2022-11-28#list-organizations-for-the-authenticated-user

public async getGitHubUserOrgs(): Promise<string[]> {
    const octokit = await this.getOctokit();
    const response = await octokit.rest.orgs.listForAuthenticatedUser();
    return response.data.map((org: { login: string }) => org.login);
  }
  1. Who is using this installer? I'd assume a redirect after https://github.com/ubiquity-os/ubiquity-os-kernel/issues/171 is complete to the installer UI which would naturally be the owner of the org. Then potentially who after that? Admin & Owner? Partner defined?

  2. What orgs should be shown when a partner uses the installer?

We sort of scrapped global config variables from ubiquity-os-config.yml but we could leverage that to enforce partner defined roles which can edit (at least via the UI).

E.g: The org owner must use it after kernel-setup and we allow them to input roles that can edit and we write this to the config separate from plugins: and we read this on fetch and check against our authenticated user.

Originally posted by @Keyrxng in https://github.com/ubiquity-os/ubiquity-os-plugin-installer/issues/25#issuecomment-2493797026