Remove web user group

This 'web' group is currently not doing anything and is considered to be
equivalent to 'redfish'.

Change-Id: I20a0a7e3a0bff3128e8e391317045a71038d119b
Signed-off-by: Ravi Teja <raviteja28031990@gmail.com>
diff --git a/test/user_mgr_test.cpp b/test/user_mgr_test.cpp
index 94120ff..664def2 100644
--- a/test/user_mgr_test.cpp
+++ b/test/user_mgr_test.cpp
@@ -658,6 +658,9 @@
     EXPECT_THROW(
         throwForInvalidGroups({"whatever"}),
         sdbusplus::xyz::openbmc_project::Common::Error::InvalidArgument);
+    EXPECT_THROW(
+        throwForInvalidGroups({"web"}),
+        sdbusplus::xyz::openbmc_project::Common::Error::InvalidArgument);
 }
 
 TEST_F(UserMgrInTest, ThrowForInvalidGroupsNoThrowWhenGroupIsValid)
@@ -665,7 +668,6 @@
     EXPECT_NO_THROW(throwForInvalidGroups({"ipmi"}));
     EXPECT_NO_THROW(throwForInvalidGroups({"ssh"}));
     EXPECT_NO_THROW(throwForInvalidGroups({"redfish"}));
-    EXPECT_NO_THROW(throwForInvalidGroups({"web"}));
     EXPECT_NO_THROW(throwForInvalidGroups({"hostconsole"}));
 }
 
@@ -1061,7 +1063,7 @@
 
 TEST_F(UserMgrInTest, CheckAndThrowForMaxGroupCountOnSuccess)
 {
-    constexpr size_t predefGroupCount = 5;
+    constexpr size_t predefGroupCount = 4;
 
     EXPECT_THAT(allGroups().size(), predefGroupCount);
     for (size_t i = 0; i < maxSystemGroupCount - predefGroupCount; ++i)
@@ -1093,9 +1095,8 @@
 
 TEST_F(UserMgrInTest, ByDefaultAllGroupsArePredefinedGroups)
 {
-    EXPECT_THAT(allGroups(),
-                testing::UnorderedElementsAre("web", "redfish", "ipmi", "ssh",
-                                              "hostconsole"));
+    EXPECT_THAT(allGroups(), testing::UnorderedElementsAre(
+                                 "redfish", "ipmi", "ssh", "hostconsole"));
 }
 
 TEST_F(UserMgrInTest, AddGroupThrowsIfPreDefinedGroupAdd)
@@ -1104,9 +1105,6 @@
         createGroup("ipmi"),
         sdbusplus::xyz::openbmc_project::User::Common::Error::GroupNameExists);
     EXPECT_THROW(
-        createGroup("web"),
-        sdbusplus::xyz::openbmc_project::User::Common::Error::GroupNameExists);
-    EXPECT_THROW(
         createGroup("redfish"),
         sdbusplus::xyz::openbmc_project::User::Common::Error::GroupNameExists);
     EXPECT_THROW(
@@ -1123,9 +1121,6 @@
         deleteGroup("ipmi"),
         sdbusplus::xyz::openbmc_project::Common::Error::InvalidArgument);
     EXPECT_THROW(
-        deleteGroup("web"),
-        sdbusplus::xyz::openbmc_project::Common::Error::InvalidArgument);
-    EXPECT_THROW(
         deleteGroup("redfish"),
         sdbusplus::xyz::openbmc_project::Common::Error::InvalidArgument);
     EXPECT_THROW(
@@ -1172,9 +1167,9 @@
 
 TEST(ReadAllGroupsOnSystemTest, OnlyReturnsPredefinedGroups)
 {
-    EXPECT_THAT(UserMgr::readAllGroupsOnSystem(),
-                testing::UnorderedElementsAre("web", "redfish", "ipmi", "ssh",
-                                              "hostconsole"));
+    EXPECT_THAT(
+        UserMgr::readAllGroupsOnSystem(),
+        testing::UnorderedElementsAre("redfish", "ipmi", "ssh", "hostconsole"));
 }
 
 } // namespace user
diff --git a/user_mgr.cpp b/user_mgr.cpp
index 08cc772..31b305d 100644
--- a/user_mgr.cpp
+++ b/user_mgr.cpp
@@ -109,8 +109,8 @@
 {
 
 // The hardcoded groups in OpenBMC projects
-constexpr std::array<const char*, 5> predefinedGroups = {
-    "web", "redfish", "ipmi", "ssh", "hostconsole"};
+constexpr std::array<const char*, 4> predefinedGroups = {"redfish", "ipmi",
+                                                         "ssh", "hostconsole"};
 
 // These prefixes are for Dynamic Redfish authorization. See
 // https://github.com/openbmc/docs/blob/master/designs/redfish-authorization.md