1
0
Fork 0
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:
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

@ -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