fix removal of SetURI on user/group
This commit is contained in:
parent
8feb7b8d56
commit
9943452ff9
@ -82,7 +82,7 @@ func (c *Common) URIPath() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *Common) URI() folio.URI {
|
func (c *Common) URI() folio.URI {
|
||||||
slog.Info("Common.URI", "parsed", c.parsedURI, "debug", debug.Stack())
|
slog.Info("Common.URI", "parsed", c.parsedURI)
|
||||||
return folio.URI(c.parsedURI.String())
|
return folio.URI(c.parsedURI.String())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -83,7 +83,6 @@ func FindSystemGroupType() GroupType {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (g *Group) Init(u data.URIParser) error {
|
func (g *Group) Init(u data.URIParser) error {
|
||||||
var initializeURI folio.URI
|
|
||||||
if u == nil {
|
if u == nil {
|
||||||
u = folio.URI(g.URI()).Parse()
|
u = folio.URI(g.URI()).Parse()
|
||||||
}
|
}
|
||||||
@ -97,8 +96,7 @@ func (g *Group) Init(u data.URIParser) error {
|
|||||||
g.GroupType = GroupTypeGroupAdd
|
g.GroupType = GroupTypeGroupAdd
|
||||||
}
|
}
|
||||||
g.CreateCommand, g.ReadCommand, g.UpdateCommand, g.DeleteCommand = g.GroupType.NewCRUD()
|
g.CreateCommand, g.ReadCommand, g.UpdateCommand, g.DeleteCommand = g.GroupType.NewCRUD()
|
||||||
initializeURI.SetURL(uri)
|
return g.SetParsedURI(u)
|
||||||
return g.SetURI(string(initializeURI))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (g *Group) NormalizePath() error {
|
func (g *Group) NormalizePath() error {
|
||||||
|
@ -94,15 +94,13 @@ func FindSystemUserType() UserType {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (u *User) Init(uri data.URIParser) error {
|
func (u *User) Init(uri data.URIParser) error {
|
||||||
var initializeURI folio.URI
|
|
||||||
if uri == nil {
|
if uri == nil {
|
||||||
uri = folio.URI(u.URI()).Parse()
|
uri = folio.URI(u.URI()).Parse()
|
||||||
}
|
}
|
||||||
initializeURI.SetURL(uri.URL())
|
|
||||||
u.Name = uri.URL().Hostname()
|
u.Name = uri.URL().Hostname()
|
||||||
u.UID = LookupUIDString(uri.URL().Hostname())
|
u.UID = LookupUIDString(uri.URL().Hostname())
|
||||||
u.CreateCommand, u.ReadCommand, u.UpdateCommand, u.DeleteCommand = u.UserType.NewCRUD()
|
u.CreateCommand, u.ReadCommand, u.UpdateCommand, u.DeleteCommand = u.UserType.NewCRUD()
|
||||||
return u.SetURI(string(initializeURI))
|
return u.SetParsedURI(uri)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (u *User) NormalizePath() error {
|
func (u *User) NormalizePath() error {
|
||||||
|
Loading…
Reference in New Issue
Block a user