mirror of
https://github.com/absmach/supermq.git
synced 2026-06-23 06:40:19 +00:00
SMQ-2974 - Fix listing entities from different domains (#2975)
Deploy GitHub Pages / swagger-ui (push) Has been cancelled
Continuous Delivery / Build and Push (push) Has been cancelled
Check the consistency of generated files / check-generated-files (push) Has been cancelled
Check License Header / check-license (push) Has been cancelled
Deploy GitHub Pages / swagger-ui (push) Has been cancelled
Continuous Delivery / Build and Push (push) Has been cancelled
Check the consistency of generated files / check-generated-files (push) Has been cancelled
Check License Header / check-license (push) Has been cancelled
Signed-off-by: nyagamunene <stevenyaga2014@gmail.com>
This commit is contained in:
@@ -192,6 +192,7 @@ func (svc service) ViewChannel(ctx context.Context, session authn.Session, id st
|
||||
func (svc service) ListChannels(ctx context.Context, session authn.Session, pm Page) (ChannelsPage, error) {
|
||||
switch session.SuperAdmin {
|
||||
case true:
|
||||
pm.Domain = session.DomainID
|
||||
cp, err := svc.repo.RetrieveAll(ctx, pm)
|
||||
if err != nil {
|
||||
return ChannelsPage{}, errors.Wrap(svcerr.ErrViewEntity, err)
|
||||
|
||||
@@ -139,6 +139,7 @@ func (svc service) View(ctx context.Context, session authn.Session, id string, w
|
||||
func (svc service) ListClients(ctx context.Context, session authn.Session, pm Page) (ClientsPage, error) {
|
||||
switch session.SuperAdmin {
|
||||
case true:
|
||||
pm.Domain = session.DomainID
|
||||
cp, err := svc.repo.RetrieveAll(ctx, pm)
|
||||
if err != nil {
|
||||
return ClientsPage{}, errors.Wrap(svcerr.ErrViewEntity, err)
|
||||
|
||||
Reference in New Issue
Block a user