Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NOISSUE - Enable OwnerID Filtering For Admin #1857

Merged
merged 6 commits into from
Jul 13, 2023

Conversation

rodneyosodo
Copy link
Member

What does this do?

Enable filtering by ownerID when the client logged in is the admin

Which issue(s) does this PR fix/relate to?

No issue

List any changes that modify/break current functionality

  • removes disconnected and sharedby tags on page
  • change the default visibility from mine to "" . This is now done at the service layer
  • If the user is an admin they can be able to list clients that are shared with them, that they own, or all clients

Have you included tests for your changes?

No

Did you document any new/modified functionality?

Yes

Notes

N/A

@rodneyosodo rodneyosodo requested a review from a team as a code owner July 11, 2023 10:43
things/clients/service.go Outdated Show resolved Hide resolved
things/clients/service.go Outdated Show resolved Hide resolved
things/clients/service.go Outdated Show resolved Hide resolved
things/clients/service.go Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jul 11, 2023

Codecov Report

Merging #1857 (dd54f9d) into master (52131eb) will increase coverage by 0.52%.
The diff coverage is 61.76%.

❗ Current head dd54f9d differs from pull request most recent head c9db748. Consider uploading reports for the commit c9db748 to get more accurate results

@@            Coverage Diff             @@
##           master    #1857      +/-   ##
==========================================
+ Coverage   64.12%   64.65%   +0.52%     
==========================================
  Files         118      118              
  Lines        9642     9678      +36     
==========================================
+ Hits         6183     6257      +74     
+ Misses       2801     2753      -48     
- Partials      658      668      +10     
Impacted Files Coverage Δ
users/clients/service.go 59.84% <45.45%> (-2.71%) ⬇️
things/groups/service.go 74.57% <50.00%> (+0.40%) ⬆️
things/clients/service.go 73.82% <59.09%> (-0.90%) ⬇️
things/groups/postgres/groups.go 68.88% <60.00%> (-0.29%) ⬇️
users/groups/postgres/groups.go 68.97% <60.00%> (-0.29%) ⬇️
things/clients/postgres/clients.go 72.26% <100.00%> (+11.52%) ⬆️
users/clients/postgres/clients.go 77.62% <100.00%> (+9.49%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@SammyOina SammyOina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rodneyosodo rodneyosodo force-pushed the NOISSUE-ownerIDfiltering branch 6 times, most recently from 3693ef2 to 653c0f3 Compare July 13, 2023 07:21
Copy link
Collaborator

@dborovcanin dborovcanin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix DCO.

Copy link
Contributor

@drasko drasko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

rodneyosodo and others added 6 commits July 13, 2023 16:44
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
Co-authored-by: Sammy Kerata Oina <44265300+SammyOina@users.noreply.github.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
Co-authored-by: Sammy Kerata Oina <44265300+SammyOina@users.noreply.github.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
Co-authored-by: Sammy Kerata Oina <44265300+SammyOina@users.noreply.github.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
Co-authored-by: Sammy Kerata Oina <44265300+SammyOina@users.noreply.github.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
@dborovcanin dborovcanin merged commit aee0081 into absmach:master Jul 13, 2023
1 of 3 checks passed
rodneyosodo added a commit to rodneyosodo/magistrala that referenced this pull request Aug 3, 2023
* Enable OwnerID Filtering For Admin

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Update things/clients/service.go

Co-authored-by: Sammy Kerata Oina <44265300+SammyOina@users.noreply.github.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Update things/clients/service.go

Co-authored-by: Sammy Kerata Oina <44265300+SammyOina@users.noreply.github.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Update things/clients/service.go

Co-authored-by: Sammy Kerata Oina <44265300+SammyOina@users.noreply.github.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Update things/clients/service.go

Co-authored-by: Sammy Kerata Oina <44265300+SammyOina@users.noreply.github.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Combine the Switch Statement

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

---------

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
Co-authored-by: Sammy Kerata Oina <44265300+SammyOina@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants