-
Notifications
You must be signed in to change notification settings - Fork 663
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
MG-1987 - Enable Entity Endpoints to Return Basic Info for non-admins. #2168
Conversation
74b82b1
to
a56bbc2
Compare
cfc7d73
to
6abdf88
Compare
@dborovcanin @rodneyosodo Do we want to return usernames + id in invitations request ? |
64e04f8
to
472ff75
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to expose things and groups for public access?
The related issue states only exposing user basic info and domain basic info to authenticated user
50631ab
to
9ab27ca
Compare
auth/service_test.go
Outdated
token: accessToken, | ||
domainID: "", | ||
err: nil, | ||
desc: "retrieve domain with empty domainID", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...domain id
users/service.go
Outdated
for i := range pg.Clients { | ||
pg.Clients[i] = mgclients.Client{Name: pg.Clients[i].Name, ID: pg.Clients[i].ID} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for i, c := range pg.Clients {
pg.Clients[i] = mgclients.Client{ID: c.ID, Name: c.Name}
}
users/service.go
Outdated
@@ -483,6 +489,10 @@ func (svc service) ListMembers(ctx context.Context, token, objectKind, objectID | |||
return mgclients.MembersPage{}, errors.Wrap(svcerr.ErrViewEntity, err) | |||
} | |||
|
|||
for i := range cp.Clients { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same.
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com> Refactor tests Signed-off-by: WashingtonKK <washingtonkigan@gmail.com> update mocks Signed-off-by: WashingtonKK <washingtonkigan@gmail.com> Update mocks Signed-off-by: WashingtonKK <washingtonkigan@gmail.com> Get basic domain info Signed-off-by: WashingtonKK <washingtonkigan@gmail.com> fix tests Signed-off-by: WashingtonKK <washingtonkigan@gmail.com> Update invitation to query names: Signed-off-by: WashingtonKK <washingtonkigan@gmail.com> fix: ci Signed-off-by: WashingtonKK <washingtonkigan@gmail.com> fix: ci Signed-off-by: WashingtonKK <washingtonkigan@gmail.com> Use entity to hold domain and user Signed-off-by: WashingtonKK <washingtonkigan@gmail.com> refinements Signed-off-by: WashingtonKK <washingtonkigan@gmail.com> update retrieve all basic info Signed-off-by: WashingtonKK <washingtonkigan@gmail.com> replace repo call with service filtering Signed-off-by: WashingtonKK <washingtonkigan@gmail.com> Update test Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com> revert changes on invitations service Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com> fix testsg Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com> remove basic information from things and groups Signed-off-by: WashingtonKK <washingtonkigan@gmail.com> add undocumented status code Signed-off-by: WashingtonKK <washingtonkigan@gmail.com> Enhance mocks and fix tests Signed-off-by: WashingtonKK <washingtonkigan@gmail.com> fix linter and remove debug logs Signed-off-by: WashingtonKK <washingtonkigan@gmail.com> change member relation to permission Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
…#2168) Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
What type of PR is this?
This is a feature because it adds the capability for entity endpoints to return basic entity information for non privileged users.
What does this do?
This PR allows non-admin users to get basic information (name and id) from entities without needing any administrator privileges.
Which issue(s) does this PR fix/relate to?
Have you included tests for your changes?
No
Did you document any new/modified feature?
Yes, I have updated the documentation for the new feature.
Notes
Signed-off-by: WashingtonKK washingtonkigan@gmail.com