Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions lib/auth/auth_with_roles.go
Original file line number Diff line number Diff line change
Expand Up @@ -6399,8 +6399,11 @@ func (a *ServerWithRoles) GetLicense(ctx context.Context) (string, error) {

// ListReleases return Teleport Enterprise releases
func (a *ServerWithRoles) ListReleases(ctx context.Context) ([]*types.Release, error) {
if err := a.action(apidefaults.Namespace, types.KindDownload, types.VerbList); err != nil {
return nil, trace.Wrap(err)
// on Cloud, any user is allowed to list releases
if !modules.GetModules().Features().Cloud {
if err := a.action(apidefaults.Namespace, types.KindDownload, types.VerbList); err != nil {
return nil, trace.Wrap(err)
}
}

return a.authServer.releaseService.ListReleases(ctx)
Expand Down
14 changes: 11 additions & 3 deletions web/packages/teleport/src/stores/storeUserContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,22 @@ export default class StoreUserContext extends Store<UserContext> {
// has access to download either teleport binaries or the license.
// Since the page is used to download both of them, having access to one
// is enough to show access this page.
// This page is only available for `dashboards`.
// This page is only available for `dashboards` and cloud customers.
hasDownloadCenterListAccess() {
return (
cfg.isDashboard &&
(this.state.acl.license.read || this.state.acl.download.list)
cfg.isCloud ||
(cfg.isDashboard &&
(this.state.acl.license.read || this.state.acl.download.list))
);
}

// hasSupportPageLinkAccess checks if the user
// has access to a Support external link in the side menu.
// This should only be displayed on `dashboards`.
hasSupportPageLinkAccess() {
return cfg.isDashboard;
}

// hasAccessToAgentQuery checks for at least one valid query permission.
// Nodes require only a 'list' access while the rest of the agents
// require 'list + read'.
Expand Down
2 changes: 2 additions & 0 deletions web/packages/teleport/src/teleportContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ class TeleportContext implements types.Context {
accessRequests: hasAccessRequestsAccess(),
newAccessRequest: userContext.getAccessRequestAccess().create,
downloadCenter: userContext.hasDownloadCenterListAccess(),
supportLink: userContext.hasSupportPageLinkAccess(),
discover: userContext.hasDiscoverAccess(),
plugins: userContext.getPluginsAccess().list,
integrations: userContext.getIntegrationsAccess().list,
Expand Down Expand Up @@ -232,6 +233,7 @@ export const disabledFeatureFlags: types.FeatureFlags = {
newAccessRequest: false,
accessRequests: false,
downloadCenter: false,
supportLink: false,
discover: false,
plugins: false,
integrations: false,
Expand Down
1 change: 1 addition & 0 deletions web/packages/teleport/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ export interface FeatureFlags {
accessRequests: boolean;
newAccessRequest: boolean;
downloadCenter: boolean;
supportLink: boolean;
discover: boolean;
plugins: boolean;
integrations: boolean;
Expand Down