mirror of
https://github.com/documize/community.git
synced 2025-07-21 14: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
|
@ -15,19 +15,19 @@ package request
|
|||
|
||||
import (
|
||||
"github.com/documize/community/core/api/entity"
|
||||
"github.com/documize/community/core/api/util"
|
||||
"github.com/documize/community/core/uniqueid"
|
||||
)
|
||||
|
||||
// SetupPersister prepares context for database activity.
|
||||
func SetupPersister() (*Persister, error) {
|
||||
var err error
|
||||
c := Context{
|
||||
Authenticated: true, // bool
|
||||
Guest: false, // bool
|
||||
Administrator: true, // bool
|
||||
Editor: true, // bool
|
||||
UserID: util.UniqueID(), // string
|
||||
OrgID: util.UniqueID(), // string
|
||||
Authenticated: true, // bool
|
||||
Guest: false, // bool
|
||||
Administrator: true, // bool
|
||||
Editor: true, // bool
|
||||
UserID: uniqueid.Generate(), // string
|
||||
OrgID: uniqueid.Generate(), // string
|
||||
//OrgURL: "http://wwww.test.org", // string
|
||||
//OrgName: "TestOrgName", // string
|
||||
AllowAnonymousAccess: false, // bool
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue