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

Support full project token permission #6728

Merged
merged 2 commits into from
Jun 6, 2023

Conversation

DanielMiao1
Copy link
Contributor

@DanielMiao1 DanielMiao1 commented Jun 2, 2023

#6726, the previous fix for issue #6724, works for PATs with only the read:project scope selected in GitHub's token creation page, but still shows missing permissions for tokens with full (read- and write-) access to projects, as GitHub's API only reports a project (instead of read:project) scope for those tokens:

Screenshots

Scope returned by PATs with full project access

The project scope selector on GitHub's (classic) token creation page:

Screenshot 2023-06-02 at 11 46 15 AM


Before

The permissions page shown for tokens with full control (which includes read-access) of projects

Notice the reported missing permissions for projects

Full access to projects permissions
 

The permissions page shown for tokens with read-only access to projects

Readonly access to projects permissions
 

The permissions page shown for tokens with permission to everything

Here, the projects scope is reported to be missing, as tokens permission to everything includes write-access to projects, causing the API to return the project (instead of read:project) scope

All permissions
 

After

The permissions page shown for tokens with full control of projects

Full access to projects permissions
 

The permissions page shown for tokens with read-only access to projects

Readonly access to projects permissions
 

The permissions page shown for tokens with permission to everything

All permissions
 

Test locations

Extension options page (varies by browser)
 


Fully fixes #6724

@DanielMiao1 DanielMiao1 marked this pull request as ready for review June 2, 2023 19:32
@DanielMiao1 DanielMiao1 changed the title Fix project scope checker in options for tokens with read- and write-access to projects Fix options project scope checker for tokens with full project control Jun 2, 2023
@DanielMiao1 DanielMiao1 changed the title Fix options project scope checker for tokens with full project control Fix options project scope checker for tokens with full projects control Jun 2, 2023
Copy link
Member

@fregante fregante left a comment

Choose a reason for hiding this comment

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

Thank you!

@fregante fregante changed the title Fix options project scope checker for tokens with full projects control Support full project token permission Jun 6, 2023
@fregante fregante merged commit 01222eb into refined-github:main Jun 6, 2023
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

The options page always shows missing read:projects priveliges
2 participants