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

Organization/Team membership for new users #7194

Closed
2 of 7 tasks
stertingen opened this issue Jun 13, 2019 · 10 comments
Closed
2 of 7 tasks

Organization/Team membership for new users #7194

stertingen opened this issue Jun 13, 2019 · 10 comments
Labels
issue/duplicate The issue has already been reported.

Comments

@stertingen
Copy link

stertingen commented Jun 13, 2019

  • Gitea version (or commit ref): 1.8.2
  • Git version: 2.20.1
  • Operating system: Docker on Debian
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

I'm using Gitea for a pretty small organization (20-30 members, but continuously changing) with LDAP (simple auth) login. When a new user logs in for the first time, I want them to have full access to all repositories owned by a organization ('MyOrga').

Is there a way to add any user to a team (for example 'Developers' in organization 'MyOrga') on first login?

(Alternative, more general approach: Map LDAP groups to teams in organizations. This would be nice to grant extra permissions based on the LDAP group; a default team membership would be realized using a filter returning true. Already proposed: #2121, #2212)

@lunny lunny added the type/proposal The new feature has not been accepted yet but needs to be discussed first. label Jun 13, 2019
@TwoTwenty
Copy link

I also need this/these feature/features.

@guillep2k
Copy link
Member

Yes, a perfect scenario would be for this to be a dynamic feature: gitea could get group membership externaly and there would be a group <---> team relationship on each organization, and users will be added/removed automatically when there are any changes. For unix/linux environments a general solution could be the command "id -Gn user" (there is a -z flag to force the separator to be \0 to support group names with spaces on them); this would be nice because it's just a system configuration and doesn't depend on the technology. For windows, there are other methods (like get-aduser in powershell).

The problem is to generalize this feature to something already supported by gitea (pam, ldap, etc.) and make it consistent. Ideally this could be some kind of plugin or extension linked to the organization.

@guillep2k
Copy link
Member

Yes, a perfect scenario would be for this to be a dynamic feature: gitea could get group membership externaly and there would be a group <---> team relationship on each organization, and users will be added/removed automatically when there are any changes. For unix/linux environments a general solution could be the command "id -Gn user" (there is a -z flag to force the separator to be \0 to support group names with spaces on them); this would be nice because it's just a system configuration and doesn't depend on the technology. For windows, there are other methods (like get-aduser in powershell).

The problem is to generalize this feature to something already supported by gitea (pam, ldap, etc.) and make it consistent. Ideally this could be some kind of plugin or extension linked to the organization.

Well, digging deeper in the documentation I now realize that we can use the API for such level of customization. Kudos to the Gitea team.

@maxguru
Copy link

maxguru commented Aug 4, 2019

I would find this useful too.

@jfint
Copy link

jfint commented Sep 20, 2019

I would really like for this to stay alive.

@dorbeus
Copy link

dorbeus commented Sep 25, 2019

In gitlab this function works like this.
https://youtu.be/HPMjM-14qa8

@IntelligentesTierMaulApollo13

Could this enhancement in gogs help here?
gogs/gogs#662

@alexattws
Copy link

We've implemented mapping LDAP groups to teams in (all) organizations (by group/team name) and published it here, if anyone is interested,
https://github.com/tws-inc/gitea-group-sync

@KaiMartin
Copy link

We've implemented mapping LDAP groups to teams in (all) organizations (by group/team name) and published it here, if anyone is interested,
https://github.com/tws-inc/gitea-group-sync

We run gitea for about 200 people in a research institute. The ability to map LDAP groups to teams and organizations would reduce day-to-day administration significantly. I will try to adapt your approach to our needs. Will report on the progress - but don't hold your breadth...

@pbodnar
Copy link

pbodnar commented Feb 29, 2020

  1. Sure, the gitea-group-sync looks promising and easily adaptable approach for any company.
  2. This issue describes de-facto the same requirement as Add user to organization based on LDAP group membership #2121 or even earlier Support for LDAP and AD Group sync #1395. Close it as a duplicate then?

@lafriks lafriks added issue/duplicate The issue has already been reported. and removed type/proposal The new feature has not been accepted yet but needs to be discussed first. labels Mar 9, 2020
@lafriks lafriks closed this as completed Mar 9, 2020
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/duplicate The issue has already been reported.
Projects
None yet
Development

No branches or pull requests