Add Groups
This commit is contained in:
@@ -305,6 +305,15 @@ func NewRequest(collection LibDataEnum, user string, peerID string, groups []str
|
||||
return &Request{Collection: collection, User: user, PeerID: peerID, Groups: groups, Caller: caller}
|
||||
}
|
||||
|
||||
func NewRequestInfoAdmin(collection LibDataEnum, user string, groups []string, caller *tools.HTTPCaller) *Request {
|
||||
p, err := GetMySelf()
|
||||
peerID := ""
|
||||
if p != nil && err == nil {
|
||||
peerID = p.GetID()
|
||||
}
|
||||
return &Request{Collection: collection, User: user, PeerID: peerID, Groups: groups, Caller: caller, admin: true}
|
||||
}
|
||||
|
||||
func NewRequestAdmin(collection LibDataEnum, caller *tools.HTTPCaller) *Request {
|
||||
return &Request{Collection: collection, Caller: caller, admin: true}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ type NATSResponse struct {
|
||||
FromApp string `json:"from_app"`
|
||||
Datatype DataType `json:"datatype"`
|
||||
User string `json:"user"`
|
||||
Groups []string `json:"groups"`
|
||||
Method int `json:"method"`
|
||||
SearchAttr string `json:"search_attr"`
|
||||
Payload []byte `json:"payload"`
|
||||
|
||||
Reference in New Issue
Block a user