Kenenbek Arzymatov
Kenenbek Arzymatov

Reputation: 9119

How to check which rights user has about given repository

Consider such situations: user clones a repo from an organization github.com/org/repo.

Is there a way how info about user's privileges (read, write, etc.) can be gotten via gitpython package?

I'm writing a school app, which will allow automatically commit and push to repo with one button (but app should show this button only to user's with privileges).

Upvotes: 1

Views: 364

Answers (1)

Marat
Marat

Reputation: 15738

No, you can not. Git permissions are ruled by server, so you can not get these rights locally except by trial and error (which I assume you don't want to do). Also, you can have multiple remotes including local ones.

In the particular case of Github, you can get permissions via GithubAPI

Upvotes: 2

Related Questions