You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* fix for github teams
* Update github.go
* added errorhandling
* Update github.md
* refactored GitHub provider
refactored hasOrg, hasOrgAndTeams and hasTeam into hasAccess to stay within function limit
* reverted Refactoring
* refactored github.go
- joined hasOrgAndTeamAccess into checkRestrictions
* refactored github.go
- reduced number of returns of function checkRestrictions to 4
* updated GitHub provider to accept legacy team ids
* GoFmt and golangci-lint
Formatted with GoFmt and followed recommendations of GoLint
* added Tests
added Tests for checkRestrictions.
* refactored in maintainer feedback
* Removed code, documentation and tests for legacy ids
* add changelog and update docs
---------
Signed-off-by: Jan Larwig <jan@larwig.com>
Co-authored-by: Jan Larwig <jan@larwig.com>
|`--github-org`|`github_org`| string | restrict logins to members of this organisation ||
11
-
|`--github-team`|`github_team`| string | restrict logins to members of any of these teams (slug), separated by a comma ||
11
+
|`--github-team`|`github_team`| string | restrict logins to members of any of these teams (slug) or (org:team), comma separated||
12
12
|`--github-repo`|`github_repo`| string | restrict logins to collaborators of this repository formatted as `orgname/repo`||
13
13
|`--github-token`|`github_token`| string | the token to use when verifying repository collaborators (must have push access to the repository) ||
14
14
|`--github-user`|`github_users`| string \| list | To allow users to login by username even if they do not belong to the specified org and team or collaborators ||
@@ -24,38 +24,52 @@ team level access, or to collaborators of a repository. Restricting by these opt
24
24
NOTE: When `--github-user` is set, the specified users are allowed to log in even if they do not belong to the specified
25
25
org and team or collaborators.
26
26
27
-
To restrict by organization only, include the following flag:
27
+
To restrict access to your organization:
28
28
29
29
```shell
30
-
--github-org=""# restrict logins to members of this organisation
30
+
# restrict logins to members of this organisation
31
+
--github-org="your-org"
31
32
```
32
33
33
-
To restrict within an organization to specific teams, include the following flag in addition to `-github-org`:
34
+
To restrict access to specific teams within an organization:
34
35
35
36
```shell
36
-
--github-team=""# restrict logins to members of any of these teams (slug), separated by a comma
37
+
--github-org="your-org"
38
+
# restrict logins to members of any of these teams (slug), comma separated
39
+
--github-team="team1,team2,team3"
40
+
```
41
+
42
+
To restrict to teams within different organizations, keep the organization flag empty and use `--github-team` like so:
43
+
44
+
```shell
45
+
# keep empty
46
+
--github-org=""
47
+
# restrict logins to members to any of the following teams (format <org>:<slug>, like octo:team1), comma separated
0 commit comments