Skip to content

Commit

Permalink
Rename json UserEndpointsEnabled (#4876)
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Quandt <[email protected]>
  • Loading branch information
thquad committed Feb 22, 2021
1 parent 366f339 commit 99ed921
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ export class SessionService {
userEndpointsEnabled(): Observable<boolean> {
return this.store.select(selectSessionData()).pipe(
first(),
map(sessionData => sessionData && sessionData.config.UserEndpointsEnabled === UserEndpointsEnabled.ENABLED)
map(sessionData => sessionData && sessionData.config.userEndpointsEnabled === UserEndpointsEnabled.ENABLED)
);
}

userEndpointsNotDisabled(): Observable<boolean> {
return this.store.select(selectSessionData()).pipe(
first(),
map(sessionData => sessionData && sessionData.config.UserEndpointsEnabled !== UserEndpointsEnabled.DISABLED)
map(sessionData => sessionData && sessionData.config.userEndpointsEnabled !== UserEndpointsEnabled.DISABLED)
);
}
}
2 changes: 1 addition & 1 deletion src/frontend/packages/store/src/types/auth.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export interface SessionDataConfig {
APIKeysEnabled?: APIKeysEnabled;
// Default value for Home View - show only favorited endpoints?
homeViewShowFavoritesOnly?: boolean;
UserEndpointsEnabled?: UserEndpointsEnabled;
userEndpointsEnabled?: UserEndpointsEnabled;
}
export interface SessionData {
endpoints?: SessionEndpoints;
Expand Down
2 changes: 1 addition & 1 deletion src/jetstream/auth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,7 @@ func TestVerifySession(t *testing.T) {

var expectedScopes = `"scopes":["openid","scim.read","cloud_controller.admin","uaa.user","cloud_controller.read","password.write","routing.router_groups.read","cloud_controller.write","doppler.firehose","scim.write"]`

var expectedBody = `{"status":"ok","error":"","data":{"version":{"proxy_version":"dev","database_version":20161117141922},"user":{"guid":"asd-gjfg-bob","name":"admin","admin":false,` + expectedScopes + `},"endpoints":{"cf":{}},"plugins":null,"config":{"enableTechPreview":false,"APIKeysEnabled":"admin_only","homeViewShowFavoritesOnly":false,"UserEndpointsEnabled":"disabled"}}}`
var expectedBody = `{"status":"ok","error":"","data":{"version":{"proxy_version":"dev","database_version":20161117141922},"user":{"guid":"asd-gjfg-bob","name":"admin","admin":false,` + expectedScopes + `},"endpoints":{"cf":{}},"plugins":null,"config":{"enableTechPreview":false,"APIKeysEnabled":"admin_only","homeViewShowFavoritesOnly":false,"userEndpointsEnabled":"disabled"}}}`

Convey("Should contain expected body", func() {
So(res, ShouldNotBeNil)
Expand Down
2 changes: 1 addition & 1 deletion src/jetstream/repository/interfaces/structs.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ type Info struct {
ListAllowLoadMaxed bool `json:"listAllowLoadMaxed,omitempty"`
APIKeysEnabled string `json:"APIKeysEnabled"`
HomeViewShowFavoritesOnly bool `json:"homeViewShowFavoritesOnly"`
UserEndpointsEnabled string `json:"UserEndpointsEnabled"`
UserEndpointsEnabled string `json:"userEndpointsEnabled"`
} `json:"config"`
}

Expand Down

0 comments on commit 99ed921

Please sign in to comment.