kopia lustrzana https://github.com/reiver/greatape
refactor(project): 🗑️ cleanup
rodzic
dab29fbe95
commit
9df75b259a
|
@ -8,17 +8,13 @@ import (
|
|||
|
||||
func Initialize(x IDispatcher) error {
|
||||
// data seed
|
||||
if !x.IdentityExists(0) {
|
||||
if !x.IdentityExists(1) {
|
||||
identity := x.AddIdentityWithCustomId(0, "invalid", "0", false, EMPTY, EMPTY, EMPTY, "invalid@localhost", false, EMPTY, EMPTY, EMPTY, "0", false, EMPTY, EMPTY, EMPTY, EMPTY, NOT_SET, ACL_RESTRICTION_ACCESS_DENIED, NOT_SET, NOT_SET)
|
||||
x.AddUser(identity.Id(), EMPTY)
|
||||
}
|
||||
|
||||
if !x.IdentityExists(1) {
|
||||
identity := x.AddIdentityWithCustomId(1, "root", "1", false, EMPTY, EMPTY, EMPTY, "root@localhost", false, EMPTY, EMPTY, EMPTY, "1", true, EMPTY, EMPTY, EMPTY, EMPTY, ACL_PERMISSION_ADMIN, ACL_RESTRICTION_NONE, NOT_SET, NOT_SET)
|
||||
identity = x.AddIdentityWithCustomId(1, "root", "1", false, EMPTY, EMPTY, EMPTY, "root@localhost", false, EMPTY, EMPTY, EMPTY, "1", true, EMPTY, EMPTY, EMPTY, EMPTY, ACL_PERMISSION_ADMIN, ACL_RESTRICTION_NONE, NOT_SET, NOT_SET)
|
||||
x.AddUser(identity.Id(), EMPTY)
|
||||
}
|
||||
|
||||
if !x.CategoryTypeExists(0) {
|
||||
categoryType := x.AddCategoryTypeWithCustomId(0, EMPTY)
|
||||
_ = x.AddCategoryWithCustomId(0, categoryType.Id(), NOT_SET, EMPTY, EMPTY)
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue