Skip to content

API token not authorized when user restricted out of main branch #5700

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

Open
2 tasks done
ready4sea opened this issue Apr 17, 2025 · 5 comments
Open
2 tasks done

API token not authorized when user restricted out of main branch #5700

ready4sea opened this issue Apr 17, 2025 · 5 comments
Labels
status: needs information More information/context is needed for assessment.

Comments

@ready4sea
Copy link

ready4sea commented Apr 17, 2025

Can we access your project?

  • I give permission for members of the FlutterFlow team to access and test my project for the sole purpose of investigating this issue.

Current Behavior

When adding a collaborator to a project and restricting him to a specific branch (not allowing him to edit or merge into "main"), the user cannot used FlutterFlow CLI or the VSCode extension to work with the specific branch.

Expected Behavior

The collborator should be able to work on his branch, while being denied access to main.

Steps to Reproduce

  • Create an entirely blank project
  • Created a branch "test-branch"
  • Invited a teammate as collaborator on the project
  • Confine him to the created "test-branch", restricting him from either editing or pushing to the "main" branch
  • Using FlutterFlow CLI or the CS Code extension, the API token returns a 403 "User not authorized" error when attempting to pull "test-branch". For example using flutterflow export-code --project test-abcdef --branch-name test-branch --project-environment Production --include-assets --token <HIS_API_TOKEN>
  • Allow the collaborator back onto "main" branch
  • Using the same command to pull "test-branch" now works fine.

Reproducible from Blank

  • The steps to reproduce above start from a blank project.

Bug Report Code (Required)

IT40lObnw4l4vtd81831LPpv+RIRQ2YXRp0noNx7aCosfZT2BLMcec/RVERDTbzmT1Y3IFqgq2oW0dKNjt+WM8I5Awisbb5FwpBUZQ/yJWOQR5CMFJWgeERQM+5UfX6m3JmzrxF5BNZtW1Y132WuO+SXUjLUNJj6PXo4Da/LZO4=

Visual documentation

User is not allowed onto "main" branch, and tries to pull "test-branch"

Image

Image

User is allowed onto "main" branch, and pulls "test-branch"

Image

Environment

- FlutterFlow version: 5.4.3
- Platform: macos & web
- Browser name and version: Chrome 135.0.7049.85
- Operating system and version affected: macos Sequoia 15.4

Additional Information

No response

@ready4sea ready4sea added the status: needs triage A potential issue that has not been confirmed as a bug. label Apr 17, 2025
@Juansarmi Juansarmi self-assigned this Apr 19, 2025
Copy link
Collaborator

Hi! I'm sorry to hear you're experiencing this issue.
I've tried to reproduce the error on my end but haven't been able to.
There are a few additional details that could help me better understand the problem:

  • Are you encountering this issue across all projects, or is it specific to one?
  • Does the error occur for a single user or for all collaborators?

Looking forward to your response.
Best regards

@Juansarmi Juansarmi added the status: needs information More information/context is needed for assessment. label Apr 19, 2025 — with Linear
@Juansarmi Juansarmi removed the status: needs triage A potential issue that has not been confirmed as a bug. label Apr 19, 2025
@ready4sea
Copy link
Author

Hi @Juansarmi,

I encountered this problem on an existing projet. Following discussion with support in the chat, I also tested it on a brand new project, created from scratch. The "Steps to Reproduce" above were created from a totally blank project.

Please note that in the command line, <HIS_API_TOKEN> is the token of the invited collaborator, which has edit rights on the test branch, but not on the main branch. It is not the token of the person doing the invitation.

Copy link
Collaborator

Hello again!

We’ve been testing this issue, but unfortunately, we haven’t been able to replicate it. However, we are continuing our investigation to find a resolution for your case. I will keep you updated as soon as we have any news.

Thank you for your patience.

Best regards

@ready4sea
Copy link
Author

Hi @Juansarmi ,

That is very strange. I literally created a blank project to demonstrate this.

The debug code is IT40lObnw4l4vtd81831LPpv+RIRQ2YXRp0noNx7aCosfZT2BLMcec/RVERDTbzmT1Y3IFqgq2oW0/OOktrxFsY5NSubGoN81bhqWDvLXXKuVLKvFJWgeERQM+5UfX6m3JmzrxF5BNZtW1Y132WuO+SXUjLUNJj6PXo4Da/LZO4=

You can have a look at it and experiment with it if needed. I am not working on it otherwise.

Copy link
Collaborator

I know — it can definitely be frustrating at times. But no worries, we’re continuing the investigation on our end.

Best regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs information More information/context is needed for assessment.
Projects
None yet
Development

No branches or pull requests

2 participants