Document what scopes the api token needs for which features #89
Labels
No labels
actions
bug
build
chore
CI
cleanup
CLI
contribution welcome
docs
duplicate
enhancement
feature
fix
good first issue
help wanted
invalid
perf
question
refactor
release
revert
style
test
tracking
UI
upstream
UX
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Aviac/codeberg-cli#89
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Like the title says, it would be useful to have
berg auth loginlist what scopes are necessary for which featuresFor example, i needed to grant some privileges for berg user info to work and not error
Hey, thanks for opening the issue! I didn't actually notice that yet! It's a bit tricky to find that out though.
Do you have any idea on how to approach this or if it is documented somewhere?
The best idea I have would be to just brute force try every action with any set of permissions which seems rather hard 😬
i have no idea unfortunately haha, I just ended up granting everything iirc, but obviously that's pretty bad practice
Yeah makes sense! I totally get what you mean. I actually did the same for development reasons.
For now, I could at least add a disclaimer that we need to set some permission for the token, but leave the configuration with reasonable values to the user. If they care, they can fine tune it.
I'm not totally happy with that approach and I'd like to provide a more robust description of what's possible but I would really like to post-pone tackling the heart of the issue until the app reaches a fairly stable state (I'm currently working in private to cover more (maybe all?) of forgejos API)
So would it be ok with you if we:
?
Seconded; I've had to re-create a token for the third time now, adding new permissions each time.
Here's my contribution to the trial-and-error process:
berg auth loginrequires theread:userpermissionberg pull createrequires thewrite:repositorypermissionI probably could have deduced this myself to be fair, but having the tool be explicit about it would be better for sure.
I think I found a way to check this via integration tests. I will try to find it out there and once we have it I can document it!