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

rultor ignores owner rights #1437

Open
Doldrums opened this issue Oct 4, 2022 · 0 comments
Open

rultor ignores owner rights #1437

Doldrums opened this issue Oct 4, 2022 · 0 comments

Comments

@Doldrums
Copy link

Doldrums commented Oct 4, 2022

In fact rultor only cheks collaborator status of repo neither the owner, while owner is actually collaborator too; so need extend this method to give rultor understanding repo owner as collaborator and not to force users add owners as collaborators.

perm = repo.collaborators().permission(author);

/**
* This repository allows this author to write into it.
* @param repo The repo
* @param author The author
* @return TRUE if write access allowed
* @throws IOException If fails
*/
private static boolean allowed(final Repo repo,
final String author) throws IOException {
String perm;
try {
perm = repo.collaborators().permission(author);
} catch (final AssertionError ex) {
perm = "forbidden";
}
return "write".equals(perm) || "admin".equals(perm);
}

@0crat 0crat added the 0crat/new label Oct 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants