1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-19 13:19:43 +02:00

refactored unique ID generator package

This commit is contained in:
Harvey Kandola 2017-07-18 22:03:23 +01:00
parent cf58f8164d
commit fe05cf7bb5
16 changed files with 69 additions and 64 deletions

View file

@ -33,6 +33,7 @@ import (
"github.com/documize/community/core/secrets"
"github.com/documize/community/core/streamutil"
"github.com/documize/community/core/stringutil"
"github.com/documize/community/core/uniqueid"
)
// AuthenticateKeycloak checks Keycloak authentication credentials.
@ -291,7 +292,7 @@ func addUser(p request.Persister, u *entity.User, addSpace bool) (err error) {
}
if addUser {
userID = util.UniqueID()
userID = uniqueid.Generate()
u.RefID = userID
err = p.AddUser(*u)
@ -317,7 +318,7 @@ func addUser(p request.Persister, u *entity.User, addSpace bool) (err error) {
a.OrgID = p.Context.OrgID
a.Editor = addSpace
a.Admin = false
accountID := util.UniqueID()
accountID := uniqueid.Generate()
a.RefID = accountID
a.Active = true