2015-08-16 14:31:54 +08:00
|
|
|
// Copyright 2014 The Gogs Authors. All rights reserved.
|
2014-04-22 18:55:27 +02:00
|
|
|
// Use of this source code is governed by a MIT-style
|
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
|
2015-08-16 14:31:54 +08:00
|
|
|
// Package ldap provide functions & structure to query a LDAP ldap directory
|
2014-04-22 18:55:27 +02:00
|
|
|
// For now, it's mainly tested again an MS Active Directory service, see README.md for more information
|
|
|
|
|
package ldap
|
|
|
|
|
|
|
|
|
|
import (
|
2015-09-14 15:48:51 -04:00
|
|
|
"crypto/tls"
|
2014-04-22 18:55:27 +02:00
|
|
|
"fmt"
|
2015-10-26 18:08:59 -07:00
|
|
|
"strings"
|
2014-05-03 10:48:14 +08:00
|
|
|
|
2015-11-26 14:04:58 -05:00
|
|
|
"gopkg.in/ldap.v2"
|
2020-02-20 02:25:02 +08:00
|
|
|
log "unknwon.dev/clog/v2"
|
2014-04-22 18:55:27 +02:00
|
|
|
)
|
|
|
|
|
|
2016-07-08 07:25:09 +08:00
|
|
|
type SecurityProtocol int
|
|
|
|
|
|
|
|
|
|
// Note: new type must be added at the end of list to maintain compatibility.
|
|
|
|
|
const (
|
|
|
|
|
SECURITY_PROTOCOL_UNENCRYPTED SecurityProtocol = iota
|
|
|
|
|
SECURITY_PROTOCOL_LDAPS
|
|
|
|
|
SECURITY_PROTOCOL_START_TLS
|
|
|
|
|
)
|
|
|
|
|
|
2014-04-22 18:55:27 +02:00
|
|
|
// Basic LDAP authentication service
|
2015-09-14 15:48:51 -04:00
|
|
|
type Source struct {
|
2015-12-01 14:49:49 +01:00
|
|
|
Host string // LDAP host
|
|
|
|
|
Port int // port number
|
2016-07-08 07:25:09 +08:00
|
|
|
SecurityProtocol SecurityProtocol
|
2015-12-01 14:49:49 +01:00
|
|
|
SkipVerify bool
|
2018-04-12 09:55:58 -04:00
|
|
|
BindDN string `ini:"bind_dn,omitempty"` // DN to bind with
|
|
|
|
|
BindPassword string `ini:",omitempty"` // Bind DN password
|
|
|
|
|
UserBase string `ini:",omitempty"` // Base search path for users
|
|
|
|
|
UserDN string `ini:"user_dn,omitempty"` // Template for the DN of the user for simple auth
|
2015-12-01 14:49:49 +01:00
|
|
|
AttributeUsername string // Username attribute
|
|
|
|
|
AttributeName string // First name attribute
|
|
|
|
|
AttributeSurname string // Surname attribute
|
|
|
|
|
AttributeMail string // E-mail attribute
|
2016-02-16 12:33:16 +01:00
|
|
|
AttributesInBind bool // fetch attributes in bind context (not user)
|
2015-12-01 14:49:49 +01:00
|
|
|
Filter string // Query filter to validate entry
|
|
|
|
|
AdminFilter string // Query filter to check if user is admin
|
2017-05-29 23:18:34 -04:00
|
|
|
GroupEnabled bool // if the group checking is enabled
|
2018-04-12 09:55:58 -04:00
|
|
|
GroupDN string `ini:"group_dn"` // Group Search Base
|
2017-05-29 22:33:50 -04:00
|
|
|
GroupFilter string // Group Name Filter
|
2018-04-12 09:55:58 -04:00
|
|
|
GroupMemberUID string `ini:"group_member_uid"` // Group Attribute containing array of UserUID
|
|
|
|
|
UserUID string `ini:"user_uid"` // User Attribute listed in Group
|
2014-04-22 18:55:27 +02:00
|
|
|
}
|
|
|
|
|
|
2015-10-26 18:08:59 -07:00
|
|
|
func (ls *Source) sanitizedUserQuery(username string) (string, bool) {
|
|
|
|
|
// See http://tools.ietf.org/search/rfc4515
|
|
|
|
|
badCharacters := "\x00()*\\"
|
|
|
|
|
if strings.ContainsAny(username, badCharacters) {
|
2017-05-29 23:18:34 -04:00
|
|
|
log.Trace("LDAP: Username contains invalid query characters: %s", username)
|
2015-10-26 18:08:59 -07:00
|
|
|
return "", false
|
|
|
|
|
}
|
|
|
|
|
|
2018-04-16 23:19:45 +02:00
|
|
|
return strings.Replace(ls.Filter, "%s", username, -1), true
|
2015-10-26 18:08:59 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ls *Source) sanitizedUserDN(username string) (string, bool) {
|
|
|
|
|
// See http://tools.ietf.org/search/rfc4514: "special characters"
|
2016-12-21 11:43:22 +03:00
|
|
|
badCharacters := "\x00()*\\,='\"#+;<>"
|
|
|
|
|
if strings.ContainsAny(username, badCharacters) || strings.HasPrefix(username, " ") || strings.HasSuffix(username, " ") {
|
2017-05-29 23:18:34 -04:00
|
|
|
log.Trace("LDAP: Username contains invalid query characters: %s", username)
|
2015-10-26 18:08:59 -07:00
|
|
|
return "", false
|
|
|
|
|
}
|
|
|
|
|
|
2018-04-16 23:19:45 +02:00
|
|
|
return strings.Replace(ls.UserDN, "%s", username, -1), true
|
2015-10-26 18:08:59 -07:00
|
|
|
}
|
|
|
|
|
|
2017-05-29 22:33:50 -04:00
|
|
|
func (ls *Source) sanitizedGroupFilter(group string) (string, bool) {
|
|
|
|
|
// See http://tools.ietf.org/search/rfc4515
|
|
|
|
|
badCharacters := "\x00*\\"
|
|
|
|
|
if strings.ContainsAny(group, badCharacters) {
|
2017-05-29 23:18:34 -04:00
|
|
|
log.Trace("LDAP: Group filter invalid query characters: %s", group)
|
2017-05-29 22:33:50 -04:00
|
|
|
return "", false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return group, true
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ls *Source) sanitizedGroupDN(groupDn string) (string, bool) {
|
|
|
|
|
// See http://tools.ietf.org/search/rfc4514: "special characters"
|
|
|
|
|
badCharacters := "\x00()*\\'\"#+;<>"
|
|
|
|
|
if strings.ContainsAny(groupDn, badCharacters) || strings.HasPrefix(groupDn, " ") || strings.HasSuffix(groupDn, " ") {
|
2017-05-29 23:18:34 -04:00
|
|
|
log.Trace("LDAP: Group DN contains invalid query characters: %s", groupDn)
|
2017-05-29 22:33:50 -04:00
|
|
|
return "", false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return groupDn, true
|
|
|
|
|
}
|
|
|
|
|
|
2016-02-16 11:58:00 +01:00
|
|
|
func (ls *Source) findUserDN(l *ldap.Conn, name string) (string, bool) {
|
2015-08-12 16:58:27 -07:00
|
|
|
log.Trace("Search for LDAP user: %s", name)
|
2017-11-16 19:32:33 -05:00
|
|
|
if len(ls.BindDN) > 0 && len(ls.BindPassword) > 0 {
|
|
|
|
|
// Replace placeholders with username
|
|
|
|
|
bindDN := strings.Replace(ls.BindDN, "%s", name, -1)
|
|
|
|
|
err := l.Bind(bindDN, ls.BindPassword)
|
2015-08-12 16:58:27 -07:00
|
|
|
if err != nil {
|
2017-11-16 19:32:33 -05:00
|
|
|
log.Trace("LDAP: Failed to bind as BindDN '%s': %v", bindDN, err)
|
2015-08-16 14:31:54 +08:00
|
|
|
return "", false
|
2014-04-22 18:55:27 +02:00
|
|
|
}
|
2017-11-16 19:32:33 -05:00
|
|
|
log.Trace("LDAP: Bound as BindDN: %s", bindDN)
|
2015-08-12 16:58:27 -07:00
|
|
|
} else {
|
2017-05-29 23:18:34 -04:00
|
|
|
log.Trace("LDAP: Proceeding with anonymous LDAP search")
|
2015-08-12 16:58:27 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// A search for the user.
|
2015-10-26 18:08:59 -07:00
|
|
|
userFilter, ok := ls.sanitizedUserQuery(name)
|
|
|
|
|
if !ok {
|
|
|
|
|
return "", false
|
|
|
|
|
}
|
|
|
|
|
|
2017-05-29 23:18:34 -04:00
|
|
|
log.Trace("LDAP: Searching for DN using filter '%s' and base '%s'", userFilter, ls.UserBase)
|
2015-08-12 16:58:27 -07:00
|
|
|
search := ldap.NewSearchRequest(
|
|
|
|
|
ls.UserBase, ldap.ScopeWholeSubtree, ldap.NeverDerefAliases, 0, 0,
|
|
|
|
|
false, userFilter, []string{}, nil)
|
|
|
|
|
|
|
|
|
|
// Ensure we found a user
|
|
|
|
|
sr, err := l.Search(search)
|
|
|
|
|
if err != nil || len(sr.Entries) < 1 {
|
2017-05-29 23:18:34 -04:00
|
|
|
log.Trace("LDAP: Failed search using filter '%s': %v", userFilter, err)
|
2015-08-16 14:31:54 +08:00
|
|
|
return "", false
|
2015-08-12 16:58:27 -07:00
|
|
|
} else if len(sr.Entries) > 1 {
|
2017-05-29 23:18:34 -04:00
|
|
|
log.Trace("LDAP: Filter '%s' returned more than one user", userFilter)
|
2015-08-16 14:31:54 +08:00
|
|
|
return "", false
|
2014-04-22 18:55:27 +02:00
|
|
|
}
|
2015-08-12 16:58:27 -07:00
|
|
|
|
2015-08-16 14:31:54 +08:00
|
|
|
userDN := sr.Entries[0].DN
|
2015-08-12 16:58:27 -07:00
|
|
|
if userDN == "" {
|
2020-02-20 02:25:02 +08:00
|
|
|
log.Error("LDAP: Search was successful, but found no DN!")
|
2015-08-16 14:31:54 +08:00
|
|
|
return "", false
|
2015-08-12 16:58:27 -07:00
|
|
|
}
|
|
|
|
|
|
2015-08-16 14:31:54 +08:00
|
|
|
return userDN, true
|
2014-04-22 18:55:27 +02:00
|
|
|
}
|
|
|
|
|
|
2016-07-08 07:25:09 +08:00
|
|
|
func dial(ls *Source) (*ldap.Conn, error) {
|
2017-05-29 23:18:34 -04:00
|
|
|
log.Trace("LDAP: Dialing with security protocol '%v' without verifying: %v", ls.SecurityProtocol, ls.SkipVerify)
|
2016-07-08 07:25:09 +08:00
|
|
|
|
|
|
|
|
tlsCfg := &tls.Config{
|
|
|
|
|
ServerName: ls.Host,
|
|
|
|
|
InsecureSkipVerify: ls.SkipVerify,
|
|
|
|
|
}
|
|
|
|
|
if ls.SecurityProtocol == SECURITY_PROTOCOL_LDAPS {
|
|
|
|
|
return ldap.DialTLS("tcp", fmt.Sprintf("%s:%d", ls.Host, ls.Port), tlsCfg)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
conn, err := ldap.Dial("tcp", fmt.Sprintf("%s:%d", ls.Host, ls.Port))
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, fmt.Errorf("Dial: %v", err)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ls.SecurityProtocol == SECURITY_PROTOCOL_START_TLS {
|
|
|
|
|
if err = conn.StartTLS(tlsCfg); err != nil {
|
|
|
|
|
conn.Close()
|
|
|
|
|
return nil, fmt.Errorf("StartTLS: %v", err)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return conn, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func bindUser(l *ldap.Conn, userDN, passwd string) error {
|
|
|
|
|
log.Trace("Binding with userDN: %s", userDN)
|
|
|
|
|
err := l.Bind(userDN, passwd)
|
|
|
|
|
if err != nil {
|
2017-02-09 19:29:59 -05:00
|
|
|
log.Trace("LDAP authentication failed for '%s': %v", userDN, err)
|
2016-07-08 07:25:09 +08:00
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
log.Trace("Bound successfully with userDN: %s", userDN)
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
|
2015-08-12 16:58:27 -07:00
|
|
|
// searchEntry : search an LDAP source if an entry (name, passwd) is valid and in the specific filter
|
2015-12-01 14:49:49 +01:00
|
|
|
func (ls *Source) SearchEntry(name, passwd string, directBind bool) (string, string, string, string, bool, bool) {
|
2016-12-21 09:43:37 +01:00
|
|
|
// See https://tools.ietf.org/search/rfc4513#section-5.1.2
|
|
|
|
|
if len(passwd) == 0 {
|
2018-06-13 22:26:56 +08:00
|
|
|
log.Trace("authentication failed for '%s' with empty password", name)
|
2016-12-21 09:43:37 +01:00
|
|
|
return "", "", "", "", false, false
|
|
|
|
|
}
|
2016-07-08 07:25:09 +08:00
|
|
|
l, err := dial(ls)
|
2016-02-16 11:58:00 +01:00
|
|
|
if err != nil {
|
2020-02-20 02:25:02 +08:00
|
|
|
log.Error("LDAP connect failed for '%s': %v", ls.Host, err)
|
2016-02-16 11:58:00 +01:00
|
|
|
return "", "", "", "", false, false
|
|
|
|
|
}
|
|
|
|
|
defer l.Close()
|
|
|
|
|
|
2015-09-04 20:39:23 -07:00
|
|
|
var userDN string
|
|
|
|
|
if directBind {
|
2015-09-16 12:15:14 -04:00
|
|
|
log.Trace("LDAP will bind directly via UserDN template: %s", ls.UserDN)
|
2015-10-26 18:08:59 -07:00
|
|
|
|
|
|
|
|
var ok bool
|
|
|
|
|
userDN, ok = ls.sanitizedUserDN(name)
|
|
|
|
|
if !ok {
|
2015-12-01 14:49:49 +01:00
|
|
|
return "", "", "", "", false, false
|
2015-10-26 18:08:59 -07:00
|
|
|
}
|
2015-09-04 20:39:23 -07:00
|
|
|
} else {
|
2017-02-09 19:29:59 -05:00
|
|
|
log.Trace("LDAP will use BindDN")
|
2015-09-04 20:39:23 -07:00
|
|
|
|
|
|
|
|
var found bool
|
2016-02-16 11:58:00 +01:00
|
|
|
userDN, found = ls.findUserDN(l, name)
|
2015-09-04 20:39:23 -07:00
|
|
|
if !found {
|
2015-12-01 14:49:49 +01:00
|
|
|
return "", "", "", "", false, false
|
2015-09-04 20:39:23 -07:00
|
|
|
}
|
2015-08-12 16:58:27 -07:00
|
|
|
}
|
|
|
|
|
|
2016-02-16 12:33:16 +01:00
|
|
|
if directBind || !ls.AttributesInBind {
|
|
|
|
|
// binds user (checking password) before looking-up attributes in user context
|
|
|
|
|
err = bindUser(l, userDN, passwd)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return "", "", "", "", false, false
|
|
|
|
|
}
|
2014-04-22 18:55:27 +02:00
|
|
|
}
|
|
|
|
|
|
2015-10-26 18:08:59 -07:00
|
|
|
userFilter, ok := ls.sanitizedUserQuery(name)
|
|
|
|
|
if !ok {
|
2015-12-01 14:49:49 +01:00
|
|
|
return "", "", "", "", false, false
|
2015-10-26 18:08:59 -07:00
|
|
|
}
|
|
|
|
|
|
2017-05-29 23:18:34 -04:00
|
|
|
log.Trace("Fetching attributes '%v', '%v', '%v', '%v', '%v' with filter '%s' and base '%s'",
|
|
|
|
|
ls.AttributeUsername, ls.AttributeName, ls.AttributeSurname, ls.AttributeMail, ls.UserUID, userFilter, userDN)
|
2014-09-07 20:04:47 -04:00
|
|
|
search := ldap.NewSearchRequest(
|
2015-08-12 16:58:27 -07:00
|
|
|
userDN, ldap.ScopeWholeSubtree, ldap.NeverDerefAliases, 0, 0, false, userFilter,
|
2017-05-29 22:33:50 -04:00
|
|
|
[]string{ls.AttributeUsername, ls.AttributeName, ls.AttributeSurname, ls.AttributeMail, ls.UserUID},
|
2014-04-22 18:55:27 +02:00
|
|
|
nil)
|
2015-08-12 16:58:27 -07:00
|
|
|
|
2014-04-22 18:55:27 +02:00
|
|
|
sr, err := l.Search(search)
|
|
|
|
|
if err != nil {
|
2020-02-20 02:25:02 +08:00
|
|
|
log.Error("LDAP: User search failed: %v", err)
|
2015-12-01 14:49:49 +01:00
|
|
|
return "", "", "", "", false, false
|
2015-08-12 16:58:27 -07:00
|
|
|
} else if len(sr.Entries) < 1 {
|
2015-09-04 20:39:23 -07:00
|
|
|
if directBind {
|
2017-05-29 23:18:34 -04:00
|
|
|
log.Trace("LDAP: User filter inhibited user login")
|
2015-09-04 20:39:23 -07:00
|
|
|
} else {
|
2017-05-29 23:18:34 -04:00
|
|
|
log.Trace("LDAP: User search failed: 0 entries")
|
2015-09-04 20:39:23 -07:00
|
|
|
}
|
|
|
|
|
|
2015-12-01 14:49:49 +01:00
|
|
|
return "", "", "", "", false, false
|
2014-04-22 18:55:27 +02:00
|
|
|
}
|
2015-08-12 16:58:27 -07:00
|
|
|
|
2016-07-12 07:07:57 +08:00
|
|
|
username := sr.Entries[0].GetAttributeValue(ls.AttributeUsername)
|
|
|
|
|
firstname := sr.Entries[0].GetAttributeValue(ls.AttributeName)
|
|
|
|
|
surname := sr.Entries[0].GetAttributeValue(ls.AttributeSurname)
|
|
|
|
|
mail := sr.Entries[0].GetAttributeValue(ls.AttributeMail)
|
2017-05-29 22:33:50 -04:00
|
|
|
uid := sr.Entries[0].GetAttributeValue(ls.UserUID)
|
|
|
|
|
|
|
|
|
|
// Check group membership
|
2017-05-29 23:18:34 -04:00
|
|
|
if ls.GroupEnabled {
|
2017-05-29 22:33:50 -04:00
|
|
|
groupFilter, ok := ls.sanitizedGroupFilter(ls.GroupFilter)
|
|
|
|
|
if !ok {
|
|
|
|
|
return "", "", "", "", false, false
|
|
|
|
|
}
|
|
|
|
|
groupDN, ok := ls.sanitizedGroupDN(ls.GroupDN)
|
|
|
|
|
if !ok {
|
|
|
|
|
return "", "", "", "", false, false
|
|
|
|
|
}
|
|
|
|
|
|
2017-05-29 23:18:34 -04:00
|
|
|
log.Trace("LDAP: Fetching groups '%v' with filter '%s' and base '%s'", ls.GroupMemberUID, groupFilter, groupDN)
|
2017-05-29 22:33:50 -04:00
|
|
|
groupSearch := ldap.NewSearchRequest(
|
|
|
|
|
groupDN, ldap.ScopeWholeSubtree, ldap.NeverDerefAliases, 0, 0, false, groupFilter,
|
2017-05-29 23:18:34 -04:00
|
|
|
[]string{ls.GroupMemberUID},
|
2017-05-29 22:33:50 -04:00
|
|
|
nil)
|
|
|
|
|
|
|
|
|
|
srg, err := l.Search(groupSearch)
|
|
|
|
|
if err != nil {
|
2020-02-20 02:25:02 +08:00
|
|
|
log.Error("LDAP: Group search failed: %v", err)
|
2017-05-29 22:33:50 -04:00
|
|
|
return "", "", "", "", false, false
|
2018-10-23 04:16:39 -04:00
|
|
|
} else if len(srg.Entries) < 1 {
|
2019-09-19 04:35:42 +03:00
|
|
|
log.Trace("LDAP: Group search returned no entries")
|
2017-05-29 22:33:50 -04:00
|
|
|
return "", "", "", "", false, false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
isMember := false
|
2018-10-23 04:16:39 -04:00
|
|
|
if ls.UserUID == "dn" {
|
|
|
|
|
for _, group := range srg.Entries {
|
|
|
|
|
for _, member := range group.GetAttributeValues(ls.GroupMemberUID) {
|
|
|
|
|
if member == sr.Entries[0].DN {
|
|
|
|
|
isMember = true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
for _, group := range srg.Entries {
|
|
|
|
|
for _, member := range group.GetAttributeValues(ls.GroupMemberUID) {
|
|
|
|
|
if member == uid {
|
|
|
|
|
isMember = true
|
|
|
|
|
}
|
2017-05-29 22:33:50 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if !isMember {
|
2017-05-29 23:18:34 -04:00
|
|
|
log.Trace("LDAP: Group membership test failed [username: %s, group_member_uid: %s, user_uid: %s", username, ls.GroupMemberUID, uid)
|
2017-05-29 22:33:50 -04:00
|
|
|
return "", "", "", "", false, false
|
|
|
|
|
}
|
|
|
|
|
}
|
2015-08-18 21:34:03 -07:00
|
|
|
|
2016-07-12 07:07:57 +08:00
|
|
|
isAdmin := false
|
2015-09-01 08:40:11 -04:00
|
|
|
if len(ls.AdminFilter) > 0 {
|
2017-02-09 19:29:59 -05:00
|
|
|
log.Trace("Checking admin with filter '%s' and base '%s'", ls.AdminFilter, userDN)
|
2015-09-01 08:40:11 -04:00
|
|
|
search = ldap.NewSearchRequest(
|
|
|
|
|
userDN, ldap.ScopeWholeSubtree, ldap.NeverDerefAliases, 0, 0, false, ls.AdminFilter,
|
|
|
|
|
[]string{ls.AttributeName},
|
|
|
|
|
nil)
|
|
|
|
|
|
|
|
|
|
sr, err = l.Search(search)
|
|
|
|
|
if err != nil {
|
2020-02-20 02:25:02 +08:00
|
|
|
log.Error("LDAP: Admin search failed: %v", err)
|
2015-09-01 08:40:11 -04:00
|
|
|
} else if len(sr.Entries) < 1 {
|
2019-09-19 04:35:42 +03:00
|
|
|
log.Trace("LDAP: Admin search returned no entries")
|
2015-09-01 08:40:11 -04:00
|
|
|
} else {
|
2016-07-12 07:07:57 +08:00
|
|
|
isAdmin = true
|
2015-09-01 08:40:11 -04:00
|
|
|
}
|
2015-08-18 21:34:03 -07:00
|
|
|
}
|
|
|
|
|
|
2016-02-16 12:33:16 +01:00
|
|
|
if !directBind && ls.AttributesInBind {
|
|
|
|
|
// binds user (checking password) after looking-up attributes in BindDN context
|
|
|
|
|
err = bindUser(l, userDN, passwd)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return "", "", "", "", false, false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2016-07-12 07:07:57 +08:00
|
|
|
return username, firstname, surname, mail, isAdmin, true
|
2014-04-22 18:55:27 +02:00
|
|
|
}
|