From edce7ec096039e5855a814c2149431d698822c76 Mon Sep 17 00:00:00 2001 From: Bernard Kim Date: Wed, 9 Mar 2022 10:20:22 -0800 Subject: [PATCH] Enable desktop access in Web UI in Cloud clusters (#10970) --- lib/web/ui/usercontext.go | 3 --- lib/web/ui/usercontext_test.go | 3 +-- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/web/ui/usercontext.go b/lib/web/ui/usercontext.go index 5e7426ec8daf1..3db8a148db565 100644 --- a/lib/web/ui/usercontext.go +++ b/lib/web/ui/usercontext.go @@ -216,9 +216,6 @@ func NewUserContext(user types.User, userRoles services.RoleSet, features proto. var billingAccess access if features.Cloud { billingAccess = newAccess(userRoles, ctx, types.KindBilling) - - // disable access to preview features - desktopAccess = access{} } logins := getLogins(userRoles) diff --git a/lib/web/ui/usercontext_test.go b/lib/web/ui/usercontext_test.go index 874d5600e0293..9ccab941f65c0 100644 --- a/lib/web/ui/usercontext_test.go +++ b/lib/web/ui/usercontext_test.go @@ -157,7 +157,6 @@ func (s *UserContextSuite) TestNewUserContextCloud(c *check.C) { roleSet := []types.Role{role} allowed := access{true, true, true, true, true} - denied := access{false, false, false, false, false} userContext, err := NewUserContext(user, roleSet, proto.Features{Cloud: true}, true) c.Assert(err, check.IsNil) @@ -186,5 +185,5 @@ func (s *UserContextSuite) TestNewUserContextCloud(c *check.C) { // cloud-specific asserts c.Assert(userContext.ACL.Billing, check.DeepEquals, allowed) - c.Assert(userContext.ACL.Desktops, check.DeepEquals, denied) + c.Assert(userContext.ACL.Desktops, check.DeepEquals, allowed) }