This is done by using a separate LDAPKey model (inherited from Key)
for storing SSH keys which came from LDAP.
These keys can be viewed from user profile, but they can not be deleted.
Signed-off-by: Oleg Girko <oleg.girko@jollamobile.com> (+2 squashed commits)
Squashed commits:
[52b3816] Made SSH key synchronisation with LDAP configurable.
Now it can be turned on or off using configuration option
sync_ssh_keys in ldap section.
The default is off to preserve compatibility with old behaviour.
Signed-off-by: Oleg Girko <oleg.girko@jollamobile.com>
[02f988d] Synchronise LDAP users SSH keys from LDAP automatically.
SSH public keys are synchronised from sshPublicKey LDAP attribute
upon login attempt and during regular LDAP security checks.
New keys are added, old keys not present in LDAP are deleted.
Signed-off-by: Oleg Girko <oleg.girko@jollamobile.com> (+1 squashed commit)
Squashed commits:
[f087fbc] Make Gitlab::LDAP::Person.entry method public.
This is needed to allow access control methods to access
arbitrary LDAP attributes.
Signed-off-by: Oleg Girko <oleg.girko@jollamobile.com>
Currently this method responds with `text/html`. It is kind of unusable
if you open it in a browser. The browser thinks it is HTML and renders
it as HTML, meaning new lines are dropped. So it's very hard to
distinguish where the key starts and where it ends.
This commit changes the content type header to `text/plain`.
Emails are used to associate commits with users. The emails
are not verified and don't have to be valid email addresses. They
are assigned on a first come, first serve basis.
Notifications are sent when an email is added.
Before we have only owner_id to determine group owner
With multiple owners per group we should get rid of owner_id in group.
So from now @group.owner will always be nil but
@group.owners return an actual array of users who can admin this group