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:
parent
cf58f8164d
commit
fe05cf7bb5
16 changed files with 69 additions and 64 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue