engine: resources: group: Make group edgeable
This adds the edgeable trait to the group resource and adds an AutoEdges method which returns nil, nil. These changes are necessary to allow UserRes to make autoedges to GroupRes.
This commit is contained in:
@@ -41,6 +41,7 @@ const groupFile = "/etc/group"
|
|||||||
// GroupRes is a user group resource.
|
// GroupRes is a user group resource.
|
||||||
type GroupRes struct {
|
type GroupRes struct {
|
||||||
traits.Base // add the base methods without re-implementation
|
traits.Base // add the base methods without re-implementation
|
||||||
|
traits.Edgeable
|
||||||
|
|
||||||
init *engine.Init
|
init *engine.Init
|
||||||
|
|
||||||
@@ -266,6 +267,11 @@ type GroupUID struct {
|
|||||||
gid *uint32
|
gid *uint32
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// AutoEdges returns the AutoEdge interface.
|
||||||
|
func (obj *GroupRes) AutoEdges() (engine.AutoEdge, error) {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
|
||||||
// IFF aka if and only if they are equivalent, return true. If not, false.
|
// IFF aka if and only if they are equivalent, return true. If not, false.
|
||||||
func (obj *GroupUID) IFF(uid engine.ResUID) bool {
|
func (obj *GroupUID) IFF(uid engine.ResUID) bool {
|
||||||
res, ok := uid.(*GroupUID)
|
res, ok := uid.(*GroupUID)
|
||||||
|
|||||||
Reference in New Issue
Block a user